Its says nil but how I can fix this problem?

Code:


Error Message:
image

I looked I given correct code lines

The correct term for what you are trying to do is :FindFirstChildOfClass("")

Before that if statement do

repeat wait() until player.Character

please don’t do that just do Player.CharacterAdded:Wait()

1 Like

The correct term for what you are trying to do is : FindFirstChildOfClass()

Actually :FindFirstChildWhichIsA("") is also a method which allows you to get BaseParts, but its not needed here

its not important. problem is why its says nil

The whole problem is you are trying to index the player character before the player character spawns. You can wait until the player character spawns by doing player.CharacterAdded:Wait() and then trying to index it with FindFirstChildWhichIsA