when I join the game Im getting a error saying my leaderstats isnt a valid member of RBXScriptSignal does anyone know how to fix this? this script is meant to give a player 1 level every 30 seconds .
game.Players.PlayerAdded:Connect(function(plr) local Level = plr.leaderstats.Level while true do Level.Value = Level.Value + 1 wait(30) end end)
Try this script for your leaderstats
game.Players.PlayerAdded:Connect(function(plr) local stats = Instance.new("Folder") stats.Name = "leaderstats" stats.Parent = plr local level = Instance.new("IntValue", stats) level.Name = "Level" end)
and the script you put on here works
Closed as Too Broad by brokenVectors, IAmNotTheReal_MePipe, and JesseSong
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?