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

How to make player rotate to the slope they are walking on?

Asked by 7 years ago
Edited 7 years ago

To explain what I'm trying to do;

A humanoid for example walks up a ramp. The humanoid acts as if hes still walking on flat ground trying to walk through the ramp instead of walking up the ramp.

I want to prevent this.

01local mouse = game.Players.LocalPlayer:GetMouse()
02local moveModel = game.Players.LocalPlayer.Character;
03-- don't detect the model we're moving
04mouse.TargetFilter = moveModel
05 
06 
07local c = moveModel;
08local hrp = c:WaitForChild("HumanoidRootPart")
09local j = hrp:WaitForChild("Root Hip")
10local orig = j.C0
11 
12function placeAtMouse()
13    -- make sure the mouse is pointing at something
14    if mouse.Target then
15        -- where we cast our ray from (shifted slightly up so the ray will hit the surface we're hovering)
View all 58 lines...
0
well please desscribe you question explain what you want. Tsb102403 -9 — 7y
0
How maybe could find the part he is walking on by using a ray. Then, match the orientation of the part using a BodyGyro. But this wouldn't work for wedges. Also might prevent you from rotating your player. Sorry if I miss understood your question. Just a thought. Bluemonkey132 194 — 7y

1 answer

Log in to vote
-2
Answered by 7 years ago

OHHHHH DERP. In humanoid properties. Change the max slope angle to what ever you want! (Make it higher)

0
omg im sorry i read the comments on community chat you explained. In real life... Yeah idk thats tough mate Tsb102403 -9 — 7y
0
The maximum slope angle is 89.9. The default is just 89. Won't help. OriginalPacificalSun 0 — 4y
Ad

Answer this question