Hi devforum, I made a part that when touched, it inserts two velocities, as shown below:
local debounce = false
script.Parent.Touched:Connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) then
if not debounce then
debounce = true
local bv1 = Instance.new("BodyVelocity")
bv1.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv1.P = 100
bv1.Velocity = hit.Parent.HumanoidRootPart.CFrame.LookVector * 100
local bv2 = Instance.new("BodyVelocity")
bv2.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv2.P = 100
bv2.Velocity = hit.Parent.HumanoidRootPart.CFrame.UpVector * 100
bv1.Parent = script.Parent
bv2.Parent = script.Parent
end
end
end)
I noticed how when I run this script, one body velocity “overlaps” the other. I mean how when touched, it either only goes the LookVector
direction, or UpVector
direction while having both velocities.
My goal is to make it so that it both goes the LookVector
and UpVector
direction, and after a little amount of time, it falls smoothly, but not rapidly.