Here is the script i am using and its not working (im trying to teleport between parts when touched)
script.Parent.Touched:Connect(function(h)
local hum = h.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
h.Parent.HumanoidRootPart.CFrame = CFrame.new(workspace["Teleporter"].Position
end
end)
I named one of the parts "Teleporter"
Try dis
script.Parent.Touched:Connect(function(h) local hum = h.Parent:FindFirstChild("Humanoid") if hum ~= nil then h.Parent.HumanoidRootPart.CFrame = CFrame.new(workspace["Teleporter"].Position) end end)
It was because u forgot to close the parenthesis