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

[Solved] How to fix player teleport on ceiling instead of inside?

Asked by 4 years ago
Edited 3 years ago

I have 2 parts that teleport the player to other parts, i have this script in both of the tp parts,

local Teleport = "roomEntrance" -- Part where the player teleports to, CanCollide is off
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) --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)

Theres a problem where when the player teleports, it teleports above the ceiling instead of inside the room. Help is appreciated!

0
use code blocks plesae Raccoonyz 1092 — 4y

1 answer

Log in to vote
0
Answered by
Maxis_s 97
4 years ago

Maybe try either:

1. Disabling CanCollide on the ceiling, either permanently, or temporarily using scripts, or...

2. Raising the roof.

The last resort would be removing the roof altogether, permanently OR temporarily.

Hope this helped!

-Maxis_s

0
Thank you! EiOooAxea 70 — 4y
Ad

Answer this question