I'm making some basic features for my game and I'm stumped on making a bounce pad. I've watched tons of tutorials that use HumanoidRootPart.Velocity or BodyVelocity but those don't work because of the whole character friction-to-ground thing. I've seen the proper effect in a bunch of games (Project LAZER for example).
Anyone know how they make this bounce effect?
Bounce pads can be made simply by using Humanoid.JumpPower which is the easiest method and most effective. We can make the player jump higher than normal by doing
1 | Humanoid.JumpPower = 100 --change to whatever you want 50 is the normal jump power |
now we have to add an event and check to see if the part is part of a player
1 | script.Parent.Touched:Connect( function (hit) |
2 | if hit.Parent:IsA( "Model" ) then |
3 | print ( "Is A Player" ) |
4 | end |
5 | end ) |
next is to find and define the humanoid
1 | script.Parent.Touched:Connect( function (hit) |
2 | if hit.Parent:IsA( "Model" ) then |
3 | Humanoid = hit.Parent:FindFirstChild( "Humanoid" ) |
4 | end |
5 | end ) |
now to fill in the rest. I like to use a debounce so there is no threat of lag
01 | ok = true |
02 | script.Parent.Touched:Connect( function (hit) |
03 | if hit.Parent:IsA( "Model" ) and ok = = true then |
04 | ok = false |
05 | local Humanoid = hit.Parent:FindFirstChild( "Humanoid" ) |
06 | Humanoid.JumpPower = 100 --Makes the player jump higher |
07 | Humanoid.Jump = true --Makes the player jump |
08 | wait( 0.5 ) |
09 | Humanoid.JumpPower = 50 --Normal Jump |
10 | ok = true |
11 | end |
12 | end ) |