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)

2 comments
Are you sure this is the correct code?
Is this the entire script? If not, please show everything so that we can debug correctly.