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

Cframe is not a valid member of Part "Workspace.FrigidusIncendium.HumanoidRootPart"?

Hey there! I'm writing a script to teleport a player when they click a menu button on the screen. Everything about it works (gui fade in and camera changing) except for grabbing the humanoid and teleporting the player. I've looked online for references on how I should script this and they all show the humanoid part being grabbed, but it doesn't seem to work for me. Everything else for my Menu GUI works flawlessly, except for the Cframe teleportation. This is the line that doesn't work

player.Character.HumanoidRootPart.Cframe = CFrame.new(-19.967, 33.099, -30.647)

I have 'player' under "local player = game.Players.LocalPlayer"

Unsure of how to fix this or if there is perhaps a workaround or something I did wrong. Thank you for reading!

1 answer

✓ Accepted answer

Easy solution, it's CFrame, not Cframe

capitalized f

lua is case sensitive

player.Character.HumanoidRootPart.CFrame = CFrame.new(-19.967, 33.099, -30.647)

1 comment

0

Whoops I didn't even catch that! I feel silly that the mistake was so small, but thank you so much!

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