How to make any block climbable

Hello!

Title is pretty self explaining.
For example i want to climb flat wall, but i cant do this. What should i do?

4 Likes

I think changing your StarterPlayer’s MaxSlopeAngle to 90 should fix this.

1 Like

yea, or add truss to the wall and make them transparent, though its unpractical so i suggest using MaxSlopeAngle

2 Likes

Doesnt work

Note:
It cant be higher than 89.9

No? i dont want to put truss begind every single block

1 Like

You could try using raycasting to position a truss in front of the wall your character is facing, or code your own climbing logic

I mean you could just add some invisible parts hanging off the wall. It works, I’ve tried it before

Use a truss or fake a climb like this.

-- server script in StarterCharacterScripts

local wall = nil
local hrp = script.Parent:WaitForChild("HumanoidRootPart")
local anim = script.Parent:WaitForChild("Humanoid")
	:LoadAnimation(script.Parent:WaitForChild("Animate").climb.ClimbAnim)

game:GetService("RunService").Heartbeat:Connect(function()
	local raycastParams = RaycastParams.new()
	raycastParams.FilterDescendantsInstances = {script.Parent}

	local raycastResult = workspace:Raycast(script.Parent.LeftFoot.Position,
		hrp.CFrame.LookVector * 1.3, raycastParams)
	wall = raycastResult and raycastResult.Instance or nil

	if wall then hrp.Velocity = Vector3.new(hrp.Velocity.X, 20, hrp.Velocity.Z)
		if script.Parent.Humanoid:GetState() ~= Enum.HumanoidStateType.Climbing then
			script.Parent.Humanoid:ChangeState(Enum.HumanoidStateType.Climbing)
		end	if not anim.IsPlaying then anim:Play() end
	else anim:Stop()
	end
end)