Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Character loads in rotated

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

Flynn9967

New Member
Reputation: 0 / 0 / 0
Feb 18, 2021
1
0
1
Roblox
Flynn9967
So I have been working on an Obby type game for a while and decided to make a checkpoint system where the character respawns on a part but whenever I load into the game I'm rotated to the left like this and move in that position and here is the script I have for the checkpoint respawing, All I know is its something to do with line 7 or 8, Please help lol been trying to fix this for like 4 hours
Lua:
game.Players.PlayerAdded:Connect(function(plr)
    local stage = plr:WaitForChild("leaderstats").Stage
    plr.CharacterAdded:Connect(function(char)
        repeat wait() until plr.Character ~= nil
        wait(0.05)
        local checkpoint = game.Workspace.Stages:FindFirstChild(stage.Value)
        char:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(checkpoint.Position + Vector3.new(0,100,0), checkpoint.Position)
        char:FindFirstChild("HumanoidRootPart").Orientation = Vector3.new(0,0,0)
        wait (0.1)
    end)
end)