I came back again to ask for support on this script

Help

everything is there, it looks like this wierd script just doesn't want to work proppely

local Players = game:GetService("Players")
local RLS = game:GetService("ReplicatedStorage")
local KT = RLS:WaitForChild("Killerthing")

local function CreateLeaderboard(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local killpoints = Instance.new("IntValue")
killpoints.Name = "Points"
killpoints.Value = 0
killpoints.Parent = leaderstats
end

local function ChangePoints(player)
local leaderstats = player:FindFirstChild("leaderstats")
local killpoints = leaderstats:FindFirstChild("Points")
local rndmAmount = math.random(1, 3)
if killpoints then
killpoints.Value = killpoints.Value + rndmAmount
end

end

local function foo()
print("HEY CAN YOU WORK YOU ")
end

KT.OnServerEvent:Connect(foo) 
Players.PlayerAdded:Connect(CreateLeaderboard)

Posted Nov 1, 2025, 11:53 PM UTC

112
Loading comments…