generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can't change all their CFrames at once?

Previous Thread :: Next Thread 
drahsid5 is not online. 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 is not online. 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 is not online. 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 is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
23 Mar 2015 06:58 PM
where has this been all my life
Report Abuse
CrimeByte is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image