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: Rotate?

Previous Thread :: Next Thread 
AetherShotgun is not online. AetherShotgun
Joined: 17 Mar 2014
Total Posts: 656
27 Mar 2014 08:31 PM
How do you rotate a part by 1, I have never rotated anything with coding...
Report Abuse
devLucas is not online. devLucas
Joined: 10 Dec 2013
Total Posts: 526
27 Mar 2014 08:31 PM
Workspace.Part.Rotation = Workspace.Part.Rotation + 1
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
27 Mar 2014 08:31 PM
Part.CFrame = Part.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))


math.rad is degrees.
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
27 Mar 2014 08:32 PM
"Workspace.Part.Rotation = Workspace.Part.Rotation + 1"
That would do nothing unless it wasn't touching anything, so I say its useless.
Report Abuse
devLucas is not online. devLucas
Joined: 10 Dec 2013
Total Posts: 526
27 Mar 2014 08:33 PM
Wow, I just realized how stupid I am. Don't use mine, use matts'.
Report Abuse
VoidShredder is not online. VoidShredder
Joined: 06 Jan 2014
Total Posts: 1467
27 Mar 2014 08:33 PM
@king what are you talking about

@dev no

workspace.Part.Rotation = workspace.Part.Rotation+Vector3.new(1,0,0)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Mar 2014 08:34 PM
by 1 what? radian? degree? gradian?
Report Abuse
AetherShotgun is not online. AetherShotgun
Joined: 17 Mar 2014
Total Posts: 656
27 Mar 2014 08:36 PM
why cntkillme why? why you make everyone feel stupid?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Mar 2014 08:37 PM
What? When he says rotate by 1 does he mean a rotation (pi/4 radians) or 1 radian or 1 degree or what?
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
27 Mar 2014 08:37 PM
'workspace.Part.Rotation = workspace.Part.Rotation+Vector3.new(1,0,0)'

That doesnt work unless no bricks are touching it.
Report Abuse
AetherShotgun is not online. AetherShotgun
Joined: 17 Mar 2014
Total Posts: 656
27 Mar 2014 08:40 PM
Didn't want to just start a new thread about this, but this is really off topic for my post IDK...

I am trying to rotate a part that I made everything is welded but it only rotates when the rootpart isn't anchored (which is a problem) y do dis?

Every other part is unanchored... yea...

while wait(0.3) do
script.Parent.rootPart.CFrame = script.Parent.rootPart.CFrame * CFrame.Angles(math.rad(45),0,0)
end

used this to weld it:

for _, v in pairs(script.Parent:GetChildren()) do
if v:IsA("Part") then
if v.Name ~= "rootPart" then
newWeld = Instance.new("Weld", script.Parent.rootPart)
newWeld.Part0 = script.Parent.rootPart
newWeld.Part1 = v
end
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