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: CFraming a model

Previous Thread :: Next Thread 
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
14 May 2014 12:19 PM
[ Content Deleted ]
Report Abuse
Azeroth17 is not online. Azeroth17
Joined: 13 May 2014
Total Posts: 86
14 May 2014 12:22 PM
Again, very new to the ROBLOX API so if this is completely wrong forgive me.


model[i].CFrame = CFrame.new(0, 10, 0)

What this is doing is making all the parts move to that position, not move up by that amount.

Try this:

model[i].CFrame = CFrame.new(model[i].CFrame + Vector3.new(0,10,0))



Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
14 May 2014 12:27 PM
[ Content Deleted ]
Report Abuse
Azeroth17 is not online. Azeroth17
Joined: 13 May 2014
Total Posts: 86
14 May 2014 12:32 PM
model[i].CFrame = model[i].CFrame + Vector3.new(0,10,0)
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
14 May 2014 12:37 PM
model[i].CFrame = CFrame.new(model[i].Position + Vector3.new(0,10,0))
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
14 May 2014 01:30 PM
[ Content Deleted ]
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
14 May 2014 01:32 PM
model:TranslateBy(Vector3.new(0,10,0))
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
14 May 2014 01:32 PM
model = script.Parent.Model:GetChildren()
wait(3)

for _, v in pairs(model) do
if v:IsA"BasePart" then
v.CFrame = v.CFrame * CFrame.new(0,0,0) --edit this to how far it goes
end
end
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