How to teleport a specific player to a part

Hi! Could someone give me a hand?
I need to teleport a player to a party.

For example, my player plays a part and it automatically teleports to a different part.

How can I do this? Someone could give me a hand.
I would appreciate it very much.
:frowning:

Player touches Part1 β†’ Player has been teleported to Part2

2 Likes

There are a lot of tutorials on youtube on how to Teleport, This is a good video to start if not, there are plenty more! Roblox Scripting Tutorial: How to Script a Teleport Pad - YouTube

2 Likes

We are not supposed to supply you with a script. Please try, and we can help you out on your issues. You won’t learn without trying! ;))

Just try on your own next time.

local Door1 = game.Workspace.Part1 --define the location of part1
local Door2 = game.Workspace.Part2 --define the location of part2
local debounce = false 



Door1.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		if not debounce then
			debounce = true

			local plr = game.Players:GetPlayerFromCharacter(hit.Parent)

			if plr then
				
				wait(2)
				hit.Parent.HumanoidRootPart.CFrame = Door2.CFrame
				wait(5)
				debounce = false
			end
		end
	end
end)


Door2.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		if not debounce then
			debounce = true

			local plr = game.Players:GetPlayerFromCharacter(hit.Parent)

			if plr then
				
				wait(2)
				hit.Parent.HumanoidRootPart.CFrame = Door1.CFrame
				wait(5)
				debounce = false
			end
		end
	end
end) 
14 Likes

Thank you guys so much! you have helped me :smiley:

2 Likes

Waiting is pointless in this script because the debounce already exists and will only be untoggled after the teleport has occurred.

3 Likes