Hi, i was running a script to fire event if player have 100 calls in leadstats. plrs = game:WaitForChild("Players")
1 plrs = game:WaitForChild("Players")
2 plr = plrs.LocalPlayer
3
4 if plr.leadstats.Calls.Value == 99 then
5
6
7 game.ReplicatedStorage.StrengthEvent.OnServerEvent:Connect(function(player)
9 player.PlayerGui.Notification.Event:Fire("New level!")
10
11 end)
12 end
Output
13:00:19.592 - ServerScriptService.LevelNotifications:4: attempt to index global 'plr' (a nil value)
13:00:19.592 - Stack Begin
13:00:19.593 - Script 'ServerScriptService.LevelNotifications', Line 4
13:00:19.593 - Stack End
How to fix it? (I'm n00b at scripts xd)

1 comment
try "game:GetService("Players")" instead.