|
| 13 Jan 2016 05:34 PM |
for i,v in pairs(MovingParts:GetChildren()) do for i = 0, 10, .1 do v.CFrame = v.CFrame * CFrame.new(0, -1, 0) end end
Trying to make some parts in a model move down at once. This isn't working, what am I doing wrong? |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jan 2016 05:36 PM |
Wrong way around there.
for i=1,10,.1 do for i,v in pairs(MovingParts:GetChildren()) do v.CFrame = v.CFrame*CFrame.new(0,-1,0) end wait() end |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 05:36 PM |
for i = 0, 100 do for i,v in pairs(MovingParts:GetChildren()) do v.CFrame = v.CFrame * CFrame.new(0, -1, 0) end wait(0.1) end |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 05:48 PM |
| Thank you. But any explanation as to why it doesn't move certain bricks that have SpecialMeshs in them? They're made to look like wedges and they're inside the model but not moving. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 13 Jan 2016 06:30 PM |
cause ur doing it wrong!!!!
also use primarypart pls
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 06:30 PM |
| actually they go in the opposite direction as everything else wtf |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2016 01:02 AM |
"actually they go in the opposite direction as everything else wtf"
I'm not really that good with this type of stuff, but this is probably because you are manipulating it in object space instead of world space.
http://wiki.roblox.com/index.php?title=CFrame&redirect=no#Methods (scroll down)
|
|
|
| Report Abuse |
|
|
|
| 14 Jan 2016 03:56 AM |
| Are any of your bricks unioned? Or is it just the Meshes that are going in the opposite directions |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2016 04:00 AM |
for i,v in pairs(MovingParts:FindFirstChild("Name of model parts are in"):GetChildren()) do if v:IsA("BasePart") then for i = 0, 10, .1 do v.CFrame = v.CFrame*CFrame.new(0, -1, 0) end end wait() end
Try that. Should work I use this code a lot when I'm making multiple parts move and don't want call each part individually |
|
|
| Report Abuse |
|
|