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
 

Making a whole model spin.

Previous Thread :: Next Thread 
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 03:39 AM
I use this script (probably overcomplicated it) to spin a single part

sys = script.Parent
Core = sys.Core
Core.BodyPosition.position = Core.Position
BrickCol = BrickColor.random()
Child = sys.Parent.OuterShell:getChildren()
for i=1,#Child do
if Child[i].Name == "Plate" then
Child[i].BrickColor = BrickCol
end
end
Core.BrickColor = BrickCol
while true do
Core.Spin.angularvelocity = Vector3.new(math.random(-1,1), math.random(-1,1), math.random(-1,1))
wait(math.random(10,30))
end





How would I spin a whole model? eg theres a cube made up of 9 parts, how would i make the whole cube spin?


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
Report Abuse
Encladeus is not online. Encladeus
Joined: 27 Dec 2010
Total Posts: 3839
08 Aug 2016 03:47 AM
model:SetPrimaryPartCFrame(model.PrimaryPart.CFrame * CFrame.Angles(X,Y,Z))

Youll need to specify the PrimaryPart of a Model.
Report Abuse
Encladeus is not online. Encladeus
Joined: 27 Dec 2010
Total Posts: 3839
08 Aug 2016 03:47 AM
Here too:

https://forum.roblox.com/Forum/ShowPost.aspx?PostID=184184791
Report Abuse
Encladeus is not online. Encladeus
Joined: 27 Dec 2010
Total Posts: 3839
08 Aug 2016 03:49 AM
The CFrame of the PrimaryPart is where the entire model will rotate upon.
Report Abuse
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 03:50 AM
tyvm ill try it


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
Report Abuse
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 03:53 AM
hmm, how do i set a primarypart?


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
Report Abuse
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 04:03 AM
ok i set the primarypart, whats the script to make it spin?


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
Report Abuse
Encladeus is not online. Encladeus
Joined: 27 Dec 2010
Total Posts: 3839
08 Aug 2016 04:17 AM
model:SetPrimaryPartCFrame(model.PrimaryPart.CFrame * CFrame.Angles(X,Y,Z))
Report Abuse
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 04:20 AM
Workspace.Model.Script:1: attempt to index global 'model' (a nil value)


??? thats in output


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
Report Abuse
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 04:24 AM
fixed it.

while true do
wait(0.01)
script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame()*CFrame.Angles(0,0.005,0))
end


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
Report Abuse
Encladeus is not online. Encladeus
Joined: 27 Dec 2010
Total Posts: 3839
08 Aug 2016 04:30 AM
Good job!
Report Abuse
Josherino is not online. Josherino
Joined: 11 Nov 2012
Total Posts: 3261
08 Aug 2016 04:31 AM
thank you very much :)


SIGN HERE! [ https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195201245 ] https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34254796 R$49,280
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