Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make a supply drop fall from the sky slowly?

Asked by 5 years ago

Im trying to make a supply drop that falls from the sky but whenever I test the game the supply drop always just falls to the ground immediately the supply drop is not anchored it is only welded.

Here is the script I used

local SupplyDrop = game.Workspace.SupplyDrop

while true do
    if SupplyDrop.Box.Position.Y > 6 then
        SupplyDrop.Box.Position.Y = SupplyDrop.Box.Position.Y - 5
    end
    wait(2)
end
0
Because it's unanchored, gravity will do its thing and pull it down towards the ground. Also, the way you're doing it is going to be very choppy anyway. nilVector 812 — 5y
0
do you know a way I can make it not choppy? MasonTheCreeperYT3 74 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

I do this in my game using BodyForce and BodyVelocity:

local speed = 20 --Change this to change how fast you want the box to fall

local SupplyDrop = game.Workspace.SupplyDrop
local box = SupplyDrop.Box

local BodyForce = Instance.new("BodyForce",box)
BodyForce.Force = Vector3.new(0,box:GetMass()*game.Workspace.Gravity,0) --Make a force to counteract gravity

local BodyVelocity = Instance.new("BodyVelocity",box)
BodyVelocity.Velocity = Vector3.new(0,-speed,0) --Make the box fall at a constant velocity

The BodyForce makes the box weightless by pushing the box up at the same strength Gravity pulls it down.

The BodyVelocity then pushes it down at a constant velocity.

EDIT: Clarification

Ad

Answer this question