How did they make this stick to wall?

The SlopeAngle doesn’t rotate the humanoid according to the surface’s angle.

It’s rotating the humanoid so it looks like im standing on the wedge instead of half flying

alright i wrote how you should do that above

I was just looking at the vid. It doesn’t look to be doing anything special. A spider walks up a steep slope and down a steep slope.

1 Like

https://gyazo.com/af2a67b1eaa38b22a106c76771d70814 This is default, The character kinda flies instead of being tilted.

You should check out this useful resource by EgoMoose:

This controller actually makes the player stick to the walls, I don’t want that.

Am I reading your topic wrong, then? Could you elaborate more on

Basically, When i walk on the wedge, The game rotates my character so it looks like im actually standing on it instead of flying on it.

Default:
https://gyazo.com/af2a67b1eaa38b22a106c76771d70814

Rotated towards wedge:
https://gyazo.com/f4a7476f95d72f73f2a587b91b8c9a78

It’s only rotating it, Not actually making the player stick to the walls

What’s the difference? I’m seeing the same effect in both the walking on wedge and EgoMoose’s controller.

Besides, if you are a spider, wouldn’t you stick…(?) to a wall anyways? I’m also pretty sure that EgoMoose achieves the walking on walls effect by rotating (CFrame) in the first place.

I think I understand. Its the tilt of the player. You want the player to stand perpendicular with the surface.

Yes, that’s exactly what i want.

Maybe do something along the lines of rayCasting to get the normal to the surface. Alter the players cFrame to match?

edit: This looks like it may already have been suggested by mooneye600.

Problem is, I’ve never done raycasting before so i have not a single braincell that can tell me what to do.
Could you help me with it?

mooneye600 posted this code above:

It results in me getting tp’d to the same spot over and over.
https://gyazo.com/ab0b631a14784c91d87482ef05233623

local RunService = game:GetService("RunService")

local Character = script.Parent
local RootPart = script.Parent.HumanoidRootPart

RunService.Heartbeat:Connect(function()
	local downRay = Ray.new(RootPart.Position, Vector3.new(0, -10, 0))
	local _, _, normal = workspace:FindPartOnRayWithIgnoreList(downRay, {script.Parent})
	RootPart.CFrame = CFrame.new(RootPart.Position, RootPart.Position + normal)
end)

Well its tricky Idk exactly without playing around with it. But you have the surface normal vector. You just need to match the character orientation to that vector.

maybe try something like:

RootPart.CFrame = RootPart.CFrame * CFrame.Angles(normal)

Arguement 3 missing or nil? What does that mean?

try splitting up the normal… CFrame.Angles(normal.X, normal.Y, normal.Z)

I’m confused…
https://gyazo.com/1981bf6d196695f00aabbe214b94e7b3