Attempt to index nil with 'leaderstats'

Hello,

- Br, iSyriux

1 Like

Try

p:WaitForChild("leaderstats")

Hello,
No. Leaderstats is already evidently existent. Using WaitForChild will only result in infinite yield.

1 Like

Can’t you instead just put the script in the post instead of watching the whole video?

No, it wouldn’t result in an infinite yield. Also, can you please show the code here because the text is kind of small in the video.

1 Like

This is your error

image

You’re trying to access the local player from a server script.

4 Likes

Just use the “player” variable that comes first with every remote event/function to index the player instead. Good luck :slightly_smiling_face: