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
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
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)
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.
1 comment
you do not need to make a new CFrame, just use the doors CFrame e.g. Player.Torso.CFrame = Door.CFrame