-
What do you want to achieve?
Hi, I’m making an climbing system and when the player touches an part (Climb trigger) I want to place the player facing the wall touched, I already finished the other stuff. -
What is the issue? Include screenshots / videos if possible!
At the moment of placing player’s rotation to the triggering part, this one does rotates, but most of times, it ends up with the player stuck inside the wall, I need something to avoid free-rotating
(The player would jump from an unknown rotation grade)
--PLAYER TOUCHES AN CLIMB PART, TRIGGER CLIMB
PlayerHumanoid.AutoRotate = false
PlayerHumanoidRootPart.Anchored = true
PlayerHumanoidRootPart.CFrame = CFrame.new(Vector3.new(PlayerHumanoidRootPart.Position.X, ClimbPart.Position.Y, PlayerHumanoidRootPart.Position.Z), ClimbPart.Position) -- Player conserves his X and Z coordinate, but Y and Rotation is set at climbpart's
My general idea to fix this is making the player rotate to the climbing part, but having pre-definides rotatios for each side of the part, but i dont know too much math or if roblox haves functions to accomplish this.