-
What do you want to achieve? Keep it simple and clear!
A door that makes it so that when the door handle is clicked it will teleport the player that clicked it. -
What is the issue? Include screenshots / videos if possible!
It refuses to work -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I watched a few tutorials, no luck.
This is in a normal script, not local.
local Handle = script.Parent
local ClickD = Handle.ClickDetector
local Tele = Handle.Parent.Parent.Tele
function Teleport()
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.Tele.Position)
end
ClickD.MouseClick:Connect(Teleport)
Tele is thing I want the player to teleport to, and handle is the thing they click, inside handle is a click detector and the script, and the handle is in a folder.