How to make Teleport Pads in Roblox Studio
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=r8lcLAjdYxw
I hope you enjoyed the tutorial! :) • script here: local part1 = game.Workspace.Teleports.Teleport1 • local part2 = game.Workspace.Teleports.Teleport2 • local debounce = {} • local function teleportToPart(part, character) • debounce[character] = true • local originalPosition = character.PrimaryPart.Position • character:SetPrimaryPartCFrame(part.CFrame) • local currentPosition = character.PrimaryPart.Position • local difference = originalPosition.Y - currentPosition.Y • character:SetPrimaryPartCFrame(CFrame.new(character.PrimaryPart.Position + Vector3.new(0, difference, 0))) • wait(0.5) • debounce[character] = false • end • part1.Touched:Connect(function(hit) • local character = hit.Parent • local humanoidRootPart = character:FindFirstChild( HumanoidRootPart ) • if humanoidRootPart and not debounce[character] then • teleportToPart(part2, character) • end • end) • part2.Touched:Connect(function(hit) • local character = hit.Parent • local humanoidRootPart = character:FindFirstChild( HumanoidRootPart ) • if humanoidRootPart and not debounce[character] then • teleportToPart(part1, character) • end • end) • Sorry that I didn't post for 1 week I just had a small break • #roblox #howto #robloxstudio #robloxstudiotutorial #easy #tutorial
#############################
