Absolutely nothing happens when I step on it.
Scroll down for error, Leaderboard, Pad script.
Leaderboard script / Normal script in workspace.
game.Players.PlayerAdded:connect(function(player)
local stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"
local points = Instance.new("IntValue", stats)
points.Name = "points"
local ingame = Instance.new("BoolValue", player)
ingame.Name = "InGame"
end)
Main teleport + money giver script / Inside a model and a normal script.
local Players = game.Players
local enabled = true
script.Parent.Touched:connect(function(hit)
if hit.Parent:IsA("Model") and hit.Parent:FindFirstChild("Humanoid") then
for i,v in pairs(Players:GetChildren()) do
if v.Name == hit.Parent.Name then
plrobj = v -- The player inside "Players"
local points = plrobj.leaderboard:FindFirstChild("points")
if enabled == true then
hit.Parent:MoveTo(game.Workspace.LobbySpawn.Position)
points.Value = points.Value + 35
enabled = false
wait(1)
enabled = true
end
end
wait()
end
end
end)
Error
21:12:12.143 - leaderboard is not a valid member of Player

2 comments
It's "leaderstats" and not "leaderboard"
Because the name is "leaderstats" it won't find anything named "leaderboard".