If I wanted to move a model of bricks with velocity = Veclocity3.new(0,0,5)
Would that work if I set
ding = game.Workspace.747
then said
ding.Velocity = Velocity3.new(0,0,5)
Is moving a model with velocity possible like this?
With Velocity? I'm a bit puzzled. What I believe you're going for, is Vector3. Vector3 is their position, X, Y, Z. That's how you would 'move' a model of bricks. Nice attempt, but it's not a straight forward property. You'd need to loop through all of the properties. And even so, you can't set a direct position for it (That I know of). You'd need to change its position by increments. Example:
local ding = game.Workspace["747"] for _,v in pairs(ding:GetChildren()) do if v:IsA("BasePart") then -- Check if it's a part v.Position = Vector3.new(v.Position.X, v.Position.Y, v.Position.Z + 5) end end
Alright, so you need a more detailed explanation! So, on line 3, I used a generic for loop. Basically, it goes through every part in the model 'ding'(child), and executes the written code. On line 5, I just increased it's position. If you only put straight number values like Vector3.new(0,0,0)
The model won't be in it's original state. It'll be all cluttered up.
Hope I helped! If you have any questions, be sure to comment!
If you were going for a Vector3, I would say that Shawnyg's function is a bit complicated...
What I would do is:
thing = Workspace.Model --Insert your model here thing:MoveTo(0,0,0) -- Insert vector3 here
Roblox has a function of models called MoveTo(). This function takes a model, and moves its primary part, and takes the rest of the model with it. The primary part can be assigned in the models properties. Without a primary part this will not work, so select a primary part for your model.
A tip if you are new, is to add a big transparent noncollidable part covering the whole model and selecting it as the primary part, allowing you to move the model as if it was a normal part