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: Fan

Previous Thread :: Next Thread 
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
03 Apr 2015 11:13 AM
Say i have 3400 ish parts in a mopdel called fan, how can i make them spin like afan
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
03 Apr 2015 11:14 AM
CSG, weld, rotate.
3400 is unacceptable, like holy.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
03 Apr 2015 11:14 AM
SetPrimaryPartCFrame???
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
03 Apr 2015 11:15 AM
How? i have this

while true do
for i = 1,360 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,0.5,0)
wait(0.05)
end

end


but this only spins center blocki p ut it in
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
03 Apr 2015 11:16 AM
If you set the center block as primarypart, and then use SetPrimaryPartCFrame, that should move all parts in relation with the center block.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
03 Apr 2015 11:16 AM
How?
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
03 Apr 2015 11:18 AM
In the command bar

workspace.Model.CenterPart = workspace.Model.PrimaryPart

workspace.Model:SetPrimaryPartCFrame(cframe thing here)
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
03 Apr 2015 11:18 AM
nvm about that last line, use that in your script
Report Abuse
TheCrookMeister is not online. TheCrookMeister
Joined: 19 Aug 2009
Total Posts: 517
03 Apr 2015 11:24 AM
In a script, you can set a single part inside of your fan to be considered your model's PrimaryPart (you should pick a part in the very middle of the fan). Then, use SetPrimaryPartCFrame(CFrame value) on your model, which will move the whole thing according to your PrimaryPart.
You can use CFrame.fromAxisAngle to rotate a part on its axis. So, the whole thing would look something like this:

local fan = script.Parent
local axis = fan:FindFirstChild('Middle')
fan.PrimaryPart = axis
fan:SetPrimaryPartCFrame(--You'll have to research the math on fromAxisAngle, I'm not good at that stuff xD--)


http://wiki.roblox.com/index.php?title=PrimaryPart
http://wiki.roblox.com/index.php?title=API:Class/Model/SetPrimaryPartCFrame
http://wiki.roblox.com/index.php?title=Cframe#Constructors
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
03 Apr 2015 11:25 AM
^
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