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

Is there a way to add BodyVelocity to a whole Model?

Asked by 8 years ago

I'm asking if there is a way to add BodyVelocity to a whole Model or should I take every part from that model and add the same velocity to it.

0
You would need to insert it inside of each part, or just make a very powerful BodyVelocity to make up for the size. alphawolvess 1784 — 8y

3 answers

Log in to vote
0
Answered by 8 years ago

This is a script that I have proven it works.

local TinyLittleBrick = {}

for i,v in pairs(workspace.ModelName:GetChildren()) do

if v.Name == "TinyLittleBrick" then
    table.insert(TinyLittleBrick,v)
end
end

for i,TinyLittleBrick in pairs(TinyLittleBrick) do
    move = Instance.new("BodyVelocity")
    move.maxForce = Vector3.new(0,3e3,0)
    move.Parent = TinyLittleBrick
    move.P = 1000
end

Now, I wanted to say, you might wanna know a few things.

So, you can name the bricks whatever you want, but you have to name them all the same thing.

The model name can be whatever you want, but it needs to be correct.

Don't modify ANYTHING except the model and brick name.

Hope this helps! :)

-Pshel

Ad
Log in to vote
0
Answered by 8 years ago

Well, it really depends on how you're viewing it. If you do not have each model welded (Either type) or attached somehow with studs, etc, then using a BodyVelocity on just one part will not make the whole model move.

If you have each part attached with welds or studs, etc, then using just one BodyVelocity will cause the whole model to move along with the part.

Log in to vote
0
Answered by
Marios2 360 Moderation Voter
8 years ago

You can only apply Instances like BodyVelocity to rendered objects. Does Model render in the game alone? No, it doesn't. A Part though does.

As you don't need to apply BodyVelocity to all parts, just apply one to Torso (as i suppose you want to do this to a player). And if not to a player, just apply to the primary part, it shoulld work:

local force = Instance.new("BodyVelocity", workspace.Player.Torso) --Second argument is parent of new Instance
force.velocity = Vector3.new(0,0,0)

If you just want to launch a character upwards with no specific goal, i recommend you use BodyForce instead - Experiment with it, and you can get 'reduced gravity' or just thrusting upwards (Which lowered gravity i suppose is used by Gravity Coil)

Answer this question