Hello everyone,
So I am trying to make it so that when you touch a part it TP’s you to another area. I made this script but getting an error and I have not used CFrame lots in the past so I am unsure on how to fix this issue.
Script:
local telpart = script.Parent
telpart.Touched:Connect(function(plr)
local player = plr.Parent
if player:FindFirstChild("Humanoid") ~= nil then
print("Player is true")
local plrtp = player:FindFirstChild("Humanoid")
plrtp.HumanoidRootPart.CFrame = workspace.TestTP.CFrame
end
end)