Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this script break after a few uses?

Asked by 9 years ago
local a = Instance.new("Part", workspace)
a.Name = "Teleport"
a.Position = Vector3.new(-5.848, 13, -95.462)
a.Anchored = true
local b = Instance.new("ClickDetector", a)
function playermover(hit) 
local torso = hit.Character.Torso 
torso.CFrame  = CFrame.new(7, 5, -55)
end
workspace.Teleport.ClickDetector.MouseClick:connect(playermover)

Answer this question