drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 23 Mar 2015 05:51 PM |
I can't figure it out for some reason.
I need all the parts to move together.
Not much else too it. My code:
rotate = coroutine.wrap(function() while wait(1/30) do wait(1/60) if _G.Pause == false then for i=1, 45 do for i, c in next, script.Parent.Collectables:GetChildren() do wait(1/60) if _G.Pause == false then c.CFrame = c.CFrame*CFrame.fromEulerAnglesXYZ(.1,.1,.1) wait(1/60) elseif _G.Pause == true then i=i-1 repeat wait() until _G.Pause == false --suspend the loop until unpaused end end end for i=1, 45 do for i, c in next, script.Parent.Collectables:GetChildren() do wait(1/60) if _G.Pause == false then c.CFrame = c.CFrame*CFrame.fromEulerAnglesXYZ(-.1,.1,-.1) wait(1/60) elseif _G.Pause == true then i=i-1 repeat wait() until _G.Pause == false end end end end wait() end end)
rotate() |
|
|
| Report Abuse |
|
|
CrimeByte
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 360 |
|
|
| 23 Mar 2015 06:45 PM |
http://wiki.roblox.com/index.php?title=SetPrimaryPartCFrame
- DHS/Razurix |
|
|
| Report Abuse |
|
|
CrimeByte
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 360 |
|
|
| 23 Mar 2015 06:48 PM |
Example:
local Model = game.Workspace['ModelHere'] Model.PrimaryPart = Model.SETTHISTOYOURPRIMARYBRICKNAME for i = 1,32 do wait() Model:SetPrimaryPartCFrame(CFrame.new(Gate.Primary.Position.X,Gate.Primary.Position.Y - 0.1,Gate.Primary.Position.Z)) end
- DHS/Razurix |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 23 Mar 2015 06:58 PM |
| where has this been all my life |
|
|
| Report Abuse |
|
|
CrimeByte
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 360 |
|
|
| 23 Mar 2015 07:10 PM |
@done
My script above had a bunch of missing variables, and the code was out of line because I copied and pasted this out of a script that I made earlier using this
I forgot to replace gate with model in the setprimarycframe stuff
- DHS/Razurix |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 23 Mar 2015 08:11 PM |
| I didnt try out your script but http://wiki.roblox.com/index.php?title=SetPrimaryPartCFrame is awesome |
|
|
| Report Abuse |
|
|