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

How do you fix the error "attempt to index nil with 'CFrame'"?

When i go to load up the gam it says an error "attempt to index nil with 'CFrame'" and I don't know how to fix it. This is the script line. character:FindFirstChild("HumanoidRootpart").CFrame = AvailableSpawnPoints[1].CFrame

1 answer

Try using WaitForChild, and the letter p is CAPS

character:WaitForChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame

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