I am trying to make a part which teleports you to a position once it is touched by the players character.
There are no occurring errors so I am confused with what to do.
I have tried different ways for the part to tell if it has been touched but I think the issue is within the Vector3.new part.
Here is my localscript:
local part = script.Parent
local player = game.Players.LocalPlayer
part.Touched:connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
player.Character:MoveTo(Vector3.new(-1164.383, 1.5, 499.175)
)
end
end)
Thank you!