local Teleport = "TP1b"

function Touch(hit)
	if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(Teleport).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(Teleport).Locked = true
	local Pos = script.Parent.Parent:findFirstChild(Teleport)
		hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end
script.Parent.Touched:Connect(Touch)

When i touch another part (part C to B) with this script, the script above breaks (part A to B)

TP1a = part A | TP1b = part B | TP2c = part C |

2 comments

0

for "Locked" shouldn't it be Locked.Value?

0

No, why?