I’m creating a obby where there are certain parts that bounce you backwards when you run into them. I attempted to use velocities, but I can’t figure out how to make you go a direction relative to where you touched the part.
Edit: I just realised I put this in Code Review instead of Scripting Support. Why do I always do this to myself
I’m not sure if this is exactly what you’re looking for but try it out,
Basically just gets the direction the player is facing and sets the velocity to the opposite direction.
if Hit.Parent:FindFirstChild("Humanoid") then
local RootPart = Hit.Parent:WaitForChild("HumanoidRootPart")
script.Parent.Velocity = RootPart.CFrame.LookVector * -50