How to make a bounce pad launch a player in the direction the top is facing

Hello. I am currently creating a racing game and i would like to add bouncing parts. Currently I have this script that works great, but only to launch the player straight up. What I would like is to be able to tilt the bouncer about 45 degrees and have the bouncer launch the player the direction it is facing. If anyone could help my out or lead me in the right direction that would be great. Thanks!

function touhed(hit)
    local hrp = hit.Parent:FindFirstChild("HumanoidRootPart")
    local bodyVel = hrp:FindFirstChildWhichIsA("BodyVelocity")
    if hrp and bodyVel then 
        local newVal ="BodyVelocity")
        newVel.Velocity =,100,0)
        newVel.MaxForce =, 10000, 10000)
        newVel.P = 5000
        newVel.Parent = hrp

So what u wanna do is reference the bouncepad and get the UpVector like this.

local Bouncepad = define it.
local BounceStrength = 25
local Direction = Bouncepad.CFrame.UpVector

local newVal ="BodyVelocity")
newVel.Velocity = Direction * BounceStrength
1 Like

Ohhh okay this works thank you

1 Like