Hello developers, I am currently working on a script which moves the player and sets its orientation. However the character doesn’t seem to rotate. How can I make this work? Here is the script:
player.CharacterAdded:Connect(function(character)
wait(.01)
if stage.Value ~= 0 then
player.Character:MoveTo(workspace:WaitForChild("Checkpoints"):WaitForChild(tostring(maxLevel.Value)).Position)
player.Character.Origin.Orientation = Vector3.new(0, 90, 0) --Setting orientation
end
end)
Hello again, I just recognized that the character animations are glitching and the character is moving backwards. Also I cleared the script.
local function setCharacter ()
local player = game.Players:GetPlayerFromCharacter(script.Parent)
local char = script.Parent
local leaderstats = player:WaitForChild("leaderstats")
local stageStat = leaderstats:WaitForChild("Stage")
char:WaitForChild("HumanoidRootPart").Orientation = Vector3.new(0,45,0)
end
setCharacter()