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: Move something ignoring rotation?

Previous Thread :: Next Thread 
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
01 Mar 2016 10:11 PM
Is there a way you can move parts with scripts ignoing rotation, example something rotated at 90 degrees kinda goes down and right at the same time. Can you move parts in ROBLOX ignoring rotation? Like when you hit ctrl+l in studio and it instead moves it on the axis rather than the axis of the part.

I feel like this is really simple to do, but just cant figure it out. Please help!


I've done nothing but teleport my cat for 3 days.
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
01 Mar 2016 10:12 PM
http://wiki.roblox.com/index.php?title=Position



Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
01 Mar 2016 10:13 PM
I know how to use position. Im asking how to make something move meanwhile ignoring its rotation so that it moves on the worlds axis, not the parts axis.


I've done nothing but teleport my cat for 3 days.
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
01 Mar 2016 10:13 PM
local x = game.Workspace.Part

x.Position = x.Position + Vector3.new(0,3,1)
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
01 Mar 2016 10:14 PM
That doesnt ignore the parts axis.. If the part is tilted, it'll move diagonaly.


I've done nothing but teleport my cat for 3 days.
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
01 Mar 2016 10:16 PM
p.CFrame = CFrame.new(0,3,0):toWorldSpace(p.CFrame)
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
01 Mar 2016 10:16 PM
replace p with your part and CFrame.new(x,y,z) with your coordinate shift relative to the part.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
01 Mar 2016 10:17 PM
Part.CFrame = Part.CFrame + Vector3.new(0,5,0)

That moves the part upwards 5 studs relative to global space.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
01 Mar 2016 10:41 PM
I used this (theirs a loop before it) and I just did the same thing as before, the Part went to the right, and the union went into the ground kinda going to the right also.

for _,v in pairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.CFrame = v.CFrame*CFrame.new(0,amount,0)
elseif v:IsA("UnionOperation") then
v.CFrame = v.CFrame*CFrame.new(0,amount,0):toWorldSpace(v.CFrame)
end


I've done nothing but teleport my cat for 3 days.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
01 Mar 2016 10:42 PM
for _,v in pairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.CFrame = v.CFrame+Vector3.new(0,amount,0)
elseif v:IsA("UnionOperation") then
v.CFrame = v.CFrame+Vector3.new(0,amount,0)
end
Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
02 Mar 2016 12:26 AM
'That doesnt ignore the parts axis.. If the part is tilted, it'll move diagonaly.'
Not true.
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
02 Mar 2016 12:46 AM
Yeah, ik. I just tried it out right now and went like "what is he talking about". I was right the first time I guess he made me right an alternative. But then how would I go about moving it ON THE LOCAL AXIS?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
02 Mar 2016 12:47 AM
.CF = .CF * CF
.Position = .CF * V3
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
02 Mar 2016 12:47 AM
nvm, i got it.

p.CFrame = p.CFrame * CFrame.new(0,10,0)
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