How can you make a jump brick script?

So, I know there’s probably a really simple answer to this question, and I feel embarrassed to have to be asking this, but how can I make a brick that will make the player jump upon touching it? I’m not good at scripting, and I can’t seem to find a way to do it. I’ve looked online but nothing really helps.

Any help is really appreciated, thank you.

1 Like

You could write a script that pretty much does the following:

  • Detects when the Part is touched using Part.Touched
  • Checks for a Humanoid using FindFirstChild()
  • Sets the Humanoid’s Jump property to true.
1 Like

In relation to the above post

A couple more things I’d like to add onto this list as well

  • Since the Touched parameter is the Hit’s Part, you can use Hit.Parent to get the Character’s model

  • You could also change the JumpPower property for the Humanoid if you want the Player to jump higher

  • Check if a Player has touched the part & and not an NPC using the GetPlayerFromCharacter function

  • I’d recommend adding a debounce so that the event doesn’t fire multiple times, but that’s up to you

1 Like

You can put this script under the part

script.Parent.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		player.Character.Humanoid.Jump = true
	end
end)
1 Like

thanks so much! that really helped. it worked.