Are you able to trigger a function if a player jumps?

Hello there forum! I just have a question to ask: can you trigger a function if you jump?

For example: If a player jumps, then a random part will turn orange

Please comment if you know! :smiley:

P.S. This is for an “if/then” statement

You can use the humanoid.Jumping function here:


game.Players.PlayerAdded:Connect(function(player))

local humanoid = player.Character.Humanoid

       humanoid.Jumping:Connect(function()
              print("Jumping")
              --run code to change the part here
       end)

end)
1 Like