Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you make that when you touch a brick you teleport to a another brick?

Asked by
goodlead -62
4 years ago

I am trying to teleport players from one brick the other brick. Can anyone help out?

1 answer

Log in to vote
1
Answered by
Roger111 347 Moderation Voter
4 years ago
Edited 4 years ago

Here is an example of touching a teleport part:

01--[[
02You will also need to have some setup before putting this script in your place. You can do it however you would like, but with MY setup I have 2 parts in my workspace. One is called "Part1" and the other is called "Part2" and my script will work if you setup like this.
03]]
04local part1 = workspace:WaitForChild("Part1")
05local part2 = workspace:WaitForChild("Part2")
06 
07local debounceTable = {}
08--[[
09debounceTable is used to keep track of the player that
10just teleported, and makes sure they're able to get off
11before being teleported again. (So they don't get telep
12-orted back and forth and can't get off)
13]]
14 
15--This detects if the touching object is a player for part1
View all 32 lines...

Try this page next time! (And make sure to hit "View Source" if you're going to copy my code)

1
Thank you very much!! goodlead -62 — 4y
0
no prob Roger111 347 — 4y
1
Also you joined roblox a long time ago in 2008!!! goodlead -62 — 4y
Ad

Answer this question