How to add VectorForce for fall down at a constant speed (dropper game)
When I jump/walk in the part its so fast and i need to fix it by doing what I looking for.
local part = workspace.NormalLobby.TryTheObbyTeleport.ChangingAnimationAndStart.Part
workspace.Gravity = game.ReplicatedStorage.GravityNormal.Value
local debounce = false
local timeout = 0.5
function onTouch(hit)
local Hum = hit.Parent:FindFirstChild("Humanoid")
if Hum and hit.Parent.Name == game.Players.LocalPlayer.Name and not debounce then
debounce = true
workspace.Gravity = 17
--workspace.Gravity /=40
task.wait(timeout)
debounce = false
end
end
part.Touched:connect(onTouch)
Please don’t make duplicate topics on the same issue.
So to make the player fall down the dropper at a constant speed, I think it’d be best to use a BodyVelocity. This will restrict the velocity on zero or more axis of your choice.
-- Example:
local BodyVelo = Instance.new("BodyVelocity")
BodyVelo.P = 1000 -- play around with this value
BodyVelo.Velocity = Vector3.new(0,-17,0)
BodyVelo.MaxForce = Vector3.new(0,10000,0)
local part = workspace.NormalLobby.TryTheObbyTeleport.ChangingAnimationAndStart.Part
workspace.Gravity = game.ReplicatedStorage.GravityNormal.Value
local debounce = false
local timeout = 0.5
function onTouch(hit)
local Hum = hit.Parent:FindFirstChild("Humanoid")
if Hum and hit.Parent.Name == game.Players.LocalPlayer.Name and not debounce then
debounce = true
workspace.Gravity = 17
local BodyVelo = Instance.new("BodyVelocity")
BodyVelo.P = 700 -- play around with this value
BodyVelo.Velocity = Vector3.new(0,-17,0)
BodyVelo.MaxForce = Vector3.new(0,10000,0)
--workspace.Gravity /=40
task.wait(timeout)
debounce = false
end
end
part.Touched:connect(onTouch)
local part = workspace.NormalLobby.TryTheObbyTeleport.ChangingAnimationAndStart.Part
workspace.Gravity = game.ReplicatedStorage.GravityNormal.Value
part.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum and hit == game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and not hit:FindFirstChild("BodyVelocity") then
local BodyVelo = Instance.new("BodyVelocity")
BodyVelo.P = 700 -- play around with this value
BodyVelo.Velocity = Vector3.new(0,-17,0)
BodyVelo.MaxForce = Vector3.new(0,10000,0)
BodyVelo.Parent = hit
end
end)