I'm making an obby and having trouble with the teleporter pads and checkpoint pads. When the obby switches directions from north to west, players when dying, will respawn on the checkpoint pads still facing north instead of the new direction, west. I've tried rotating the pads to face west, but players still face north no matter how I rotate it. In addition, I have the same problem with teleporter pads. When players step on the pads while walking north, I want them to come out from the new teleporter facing east, but they still face north, no matter how I rotate the pads. How can I fix this?
Teleporter pad script:
local Teleport = "Part14"
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
script.Parent.Touched:connect(Touch)
Checkpoint script:
local checkpoints = workspace:WaitForChild("Checkpoints")
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local v = Instance.new("IntValue")
v.Name = "Stage"
v.Value = 1
v.Parent = leaderstats
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
wait()
char:MoveTo(checkpoints[v.Value].Position)
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == v.Value +1 then
v.Value = v.value +1
end
end
end)
end)
end)

3 comments
You could set the character's humanoidrootpart's CFrame to the same CFrame as the respawn block, or wherever the player teleports to
how would i do that?
You would need to first get the character. And then from there: Character.HumanoidRootPart.CFrame = script.Parent.CFrame Just as long as script.Parent is the part you want the player to spawn or be teleported to