Climbing (Event)

From Legacy Roblox Wiki
Jump to navigationJump to search
Climbing ( Float speed )
Description Fired when a character climbs.
Member of: Humanoid


Description

The Climbing event of Humanoid gets triggered whenever a character is climbing up bricks. This can be fired when a character climbs up either a Truss or a stack of parts.

The argument, speed, describes how quickly the player is climbing. The value of speed is 70% of the Humanoid's WalkSpeed.

Example
local function onCharacterClimbing(character, speed)
  print(character.Name, "is climbing at a speed of", speed, "studs / second.")
end

local function onCharacterAdded(character)
  character.Humanoid.Climbing:connect(function(speed) onCharacterClimbing(character, speed) end)
end

local function onPlayerAdded(player)
  player.CharacterAdded:connect(onCharacterAdded)
end

game.Players.PlayerAdded:connect(onPlayerAdded)