Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a door teleport you to another door?

I need help making a script that teleports you from point A to point B upon touching the part, followed by an opening door animation.

1 answer

Inside the door write this:

script.Parent.Touched:Connect(function(hit)
	if game.Players:GetPlayerFromCharacter(hit.Parent)then
		local RootPart = hit.Parent:FindFirstChild("HumanoidRootPart")
		
		RootPart.CFrame = CFrame.new(0, 0, 0) --Here put the position of the part you want to be teleported to

	end
	
end)

1 comment

0

About the door opening animation, you could use a hinge that acts as a center of rotation, to do this you could use CFrame. Here is a link to read more about it: https://developer.roblox.com/en-us/articles/CFrame-Math-Operations

This discussion is preserved as it was. New answers, comments, and votes are closed.