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 » Scripting Helpers
Home Search
 

Re: Help?

Previous Thread :: Next Thread 
citybuilder13 is not online. citybuilder13
Joined: 17 Oct 2008
Total Posts: 32
28 Sep 2011 02:46 PM
Sorry if this sounds a little noobish, but I'm having a hard time using Animinus's Model rotater, heres the script:

--[==[
TransformModel (table parts, CFrame center, CFrame new_center [, bool recurse ] )

Add this function to your script whenever you need it.

TransformModel allows you to move or rotate a group of parts, such that they will keep their relative positions to each other.
You can use this to move or rotate and entire model.

The first argument is a table (usually model:GetChildren()), which will contain all the parts that will be transformed.
The second argument is a CFrame, which is the center of transformation. All the parts wil be transformed around this point.
The third argument is another CFrame. This CFrame will become the center *after* the parts have been tranformed.
For example, if the new center is 3 studs to left from the old center, all the parts will be moved 3 studs to the left.

A fourth, optional argument specifies whether the function will transform all descendants of the model.

Here's an example that rotates the entire model by 45 degrees:

local center = model:GetModelCFrame()
TransformModel(
model:GetChildren(),
center,
center * CFrame.Angles(0,math.rad(45),0),
true
)
]==]

function TransformModel(objects, center, new, recurse)
for _,object in pairs(objects) do
if object:IsA("BasePart") then
object.CFrame = new:toWorldSpace(center:toObjectSpace(object.CFrame))
end
if recurse then
TransformModel(object:GetChildren(), center, new, true)
end
end
end








I want to have a model in the workspace(Model34) turn 45 degrees every second....
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
28 Sep 2011 02:47 PM
[ Content Deleted ]
Report Abuse
citybuilder13 is not online. citybuilder13
Joined: 17 Oct 2008
Total Posts: 32
28 Sep 2011 02:52 PM
Forum is called 'Scripting HELPERS' if you can't help, don't post, that's all there is to it. Technically that's trolling/spam.
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
28 Sep 2011 02:58 PM
I can help, you are spamming.
The script explains itself, if you're too dumb to understand that then it's your fault.

-♂ MYRCO♂-
Scripter, music obbsesed, atheist and dutch. What else?
Report Abuse
citybuilder13 is not online. citybuilder13
Joined: 17 Oct 2008
Total Posts: 32
28 Sep 2011 03:18 PM
It does explain it, yes, I admitted that I don't understand it. I script all the time, I just hate programming vocab.
Report Abuse
citybuilder13 is not online. citybuilder13
Joined: 17 Oct 2008
Total Posts: 32
28 Sep 2011 03:33 PM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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