How would I code a ladder that has a 30% chance of making you slip on it every 3 seconds
Like when the player is climbing (idk how’d you detect it, I’d just use a touched event) you could use math.random to decide if they fall or not.
while player:IsOnLadder() do -- Replace this with how you’ll detect if the player is on the ladder
while task.wait(3) do
local Chosen = math.random(3, 1)
if Chosen == 3 then -- Could be 1, 2, or 3
-- Set CanCollide off the ladder for like 2 seconds (from a Local Script)
end
end
end
This isn’t exactly what you’re looking for but maybe you’ll like it (maybe not).
i already know how to detect a climbing plr but how to make then slip? do i just make them sit?
You could make it so that the player would Sit.
Initalize Humanoid as the player’s Humanoid.
Humanoid:ChangeState(13) -- Humanoid.Sit is readonly according to Documentation
or just use Ragdoll, as stated below.
The best way would be just changing the players humanoid state to Ragdoll
Humanoid:ChangeState(1)
how would this look? dont i need to make a custom for ragdoll like in jb?
Remove the humanoid root part and the player slips on the ladder. Add it back and put it in the right spot and the player untrips. I have a trip part in my building kit you can use as an example.