Город МОСКОВСКИЙ
00:06:55

[Roblox Studio] How to make a teleport pad (Script In Desc)

Аватар
Игры и Роботы
Просмотры:
44
Дата загрузки:
29.10.2023 18:25
Длительность:
00:06:55
Категория:
Лайфхаки

Описание

Teleport Script 1: local Teleport = "Part1" --Put the name of the Part between the ""s.
function Touch(hit) --Indicates that the Part has been Touched.
if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(Teleport).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(Teleport).Locked = true --Checks Debounce.
local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end --Takes you there and Ends the Function.
script.Parent.Touched:connect(Touch) --Listens out for Touchers.Teleport 2: local Teleport = "Part2" --Put the name of the Part between the ""s.
function Touch(hit) --Indicates that the Part has been Touched.
if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(Teleport).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(Teleport).Locked = true --Checks Debounce.
local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end --Takes you there and Ends the Function.
script.Parent.Touched:connect(Touch) --Listens out for Touchers.
(Recorded with https://screencast-o-matic.com)

Рекомендуемые видео