Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

"Attempt To Index A Nil Value" how do i fix that?

i was trying to convert a script to fe to play in void script builders and i got the error attempt to index a nil value on the line 103

the link to the full script: https://pastebin.com/sSPt0xuH

1 answer

I believe you can fix that error by replacing line 103 with this:

char = plr.Character or plr.CharacterAdded:Wait()

I don't know if this is the cause, but sometimes the script runs before the character pointer in 'plr' can load. It might not be the case in an environment like Script Builders however.

3 comments

0

or repeat wait() until player.Character ~= nil

0

thanks for answering. it did not work sadly. but i thought thi quetion wont be answered and lost in the sea. fortunately is not!

0

if you can, try to ue it on the game. i tried on the place 2

This discussion is preserved as it was. New answers, comments, and votes are closed.