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.
COMMUNITY QUESTION
How do I make a door teleport you to another door?
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
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