so I have a game Hello I am a Block and It has a section where you can teleport from the second floor to the first floor and it works in studio but when I tried it in normal Roblox it didn’t work
I’ve tried pretty much everything so I don’t know what to do
Here’s the script
local Teleport = "example part" --this is just a filler name
function Touch(hit)
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
local Pos = script.Parent.Parent:findFirstChild(Teleport)
hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end and Ends the Function.
script.Parent.Touched:connect(Touch)