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

please help me with this error and can it be fixed? attempt to index nil with 'Position'

`i am trying to make an orb for my game but this keeps coming up i don't know what it means and how i can fix it? Here is the code please tell me if i need to add any more of my code

newOrb:MoveTo(game.Workspace.OrbSpawnLocations:FindFirstChild(spawnLocStr).Posi
tion)

the second line is spose to be part of the first i just didn't have space

1 answer

✓ Accepted answer

the game is not finding the child called spawnLocStr cuz the game may responded with no cuz that child has not been loaded yet , so consider changing FindFirstChild() to WaitForChild()

6 comments

0

now it says: Infinite yield possible on 'Workspace.OrbSpawnLocations:WaitForChild("SpawnLoc15")' is this good?

0

wait

0

make sure that the name is right and that this spawn location really exist

0

ok thank you

0

does this site answer non out put errors?

0

idk

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