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

Player teleports on top of the brick that is above when teleporting? [SOLVED]

Asked by 5 years ago
Edited 5 years ago

This question has been solved by the original poster.
script.Parent.Gas.Touched:Connect(function(Hit)

    if Hit.Parent:FindFirstChild("Humanoid") then

    Hit.Parent:MoveTo(script.Parent.Teleporter.Position)

    end

    end)

https://gyazo.com/ed1012dc08f06a3cbae5a6c9800da5e4 It spawns on top of those black things at the top. I want the player to teleport inside the red thing when they get teleported. How do I make it so it does not teleport the player on top?

For anyone wondering, here is the working code:

script.Parent.Gas.Touched:Connect(function(Hit)

if Hit.Parent:FindFirstChild("Humanoid") then

Hit.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.Teleporter.Position))

end

end)
0
Within the model add a part called teleport position and cet the CFrame/Position to that User#5423 17 — 5y
0
I did, it won't work. It is even under the map. And it teleports on top. Thesquid13 301 — 5y
0
If you change using Position then the part will be put on top of the other part if there is no room. Swap to set CFrame using https://developer.roblox.com/api-reference/function/Model/SetPrimaryPartCFrame User#5423 17 — 5y
0
Alright, it works now. Thank you. Thesquid13 301 — 5y
0
MoveTo will automatically place you above the object Ziffixture 6913 — 5y

Answer this question