"char is not a valid member of (Player name here)"

Replace Player.char with char.

It’s trying to find the property/key in Player named char, Char isn’t a valid property.

1 Like

Should be char. Also, why are you defining a players character twice?

After I did what you said, the error in output was gone, but the player still was not teleporting to a different part when I clicked the play button

Instead, It teleports to the part without me clicking play

I uh, recommend you try and rewrite your code, I can barely read it because of the spacing and there are repeated values that a bascially useless

char.HumanoidRootPart.CFrame = workspace.Spawns.HumanSpawn.CFrame

Sure this line doesn’t have an effect on it?

HumanSpawn is the spawn part, and HumanTP is the part people teleport to when clicking the button

And the two parts are far from eachother

Ill see what happens if I remove the line

Blockquote

HmmmTheUnderratedDevProgrammer

KillzIsSomeRandomGuy

15m

char.HumanoidRootPart.CFrame = workspace.Spawns.HumanSpawn.CFrame

Sure this line doesn’t have an effect on it?

I removed the line, and still no fix

Ah, not sure about the issue then.

You would have to do some debugging, with prints and etc.

You set char as a variable twice


local char = Player.Character or Player.CharacterAdded:Wait() --Gets the character of the player

local char = Player.Character

I removed one of the two variables and still no fix

And also replace all Player.char with char as mentioned by @MixedConscience

I also did that. Is there any other way this problem could be fixed?

Have you removed local Character = Player.Character or Player.CharacterAdded:Wait()?

Yes, but the main problem is that the Player is supposed to spawn in a black box so no zombies attack them while they are in the main menu screen. However, upon running the game, the player spawns at the part that the script is meant to teleport them to when they click play

can you tell me what exactly the issue is ? I’ve been looking trough posts and i see that your first issue is solved, what now ?

The issue is explained above your reply

Ah you should have said so sooner, I thought the main problem still consisted. Could you resend your code, and are there any errors?