Pretty much i want to detect if a humanoid is climbing (stationary climb or moving climb) for 3 seconds continuously, and if so push him off where he is climbing.
I tried this code but it doesn't work because it executes the function upon the humanoid climbing and does not take into consideration if the player has been climbing for 3 seconds continuously - I want to take this into consideration.
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local rootpart = character.HumanoidRootPart
character.Humanoid.Climbing:Connect(function()
wait(3)
rootpart.Velocity = rootpart.CFrame.lookVector*-50
end)
my friend wrote this code for me and i also do not understand why he added the " or player.CharacterAdded:wait() ".
local character = player.Character or player.CharacterAdded:wait()
thank you!

1 comment
Thank you so much man this is perfect, works like a charm and it makes sense!!! (for most part, I have to learn more :P) I am new to programming and all and so I truly appreciate the work and effort you have provided!!!! Thank you again :)