local enabled = true function onTouched(human) print("Touched") local touchpart = script.Parent local door = script.Parent.Parent.Door local h = human.Parent:FindFirstChildWhichIsA("Humanoid") if h and enabled then enabled = false print(1) door.BodyPosition.Position = script.Parent.Parent.End.Position wait(3) door.BodyPosition.Position = script.Parent.Parent.Start.Position enabled = true wait(1) print("Done") end end script.Parent.Touched:Connect(onTouched)
I put this script into the part that the player touches. When I run the game, the brick goes to position 0,0,0. (Prints are just there to try to pinpoint problem) What's wrong with it?