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

How to fix teleportation door script? Won't work when clicked

Player = game.Players.player
Door = script.Parent

game.Workspace.Player.Torso.CFrame = CFrame.new(Door)


Door won't teleport when clicked? Someone please help me out

2 answers

There is no Torso in the Player it is in the Character so your variable would be:

Player = game.Players.LocalPlayer.Character

Also in your CFrame.new() you need a CFrame not just the name of a Part:

Player.Torso.CFrame  = CFrame.new(Door.CFrame)

1 comment

0

you do not need to make a new CFrame, just use the doors CFrame e.g. Player.Torso.CFrame = Door.CFrame

You can't just say that the"Player = game.Players.player". You need to create a ClickDetector in the door and use an inbuilt function of "MouseClick" with a parameter of the player to get the player. Also what kingdom5 said about the CFrame. Also, with that lacikaturai said, you can't use "LocalPlayer" as the player unless the script is inside the person as a local script.

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