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: please help me fix this 3 line script

Previous Thread :: Next Thread 
RoReimer is not online. RoReimer
Joined: 12 May 2013
Total Posts: 170
27 Sep 2016 05:56 PM
hi guys, I have a brick that is welded onto something.
im trying to make this brick rotate (without moving position)

i did this & it worked, but it keeps moving the brick. but i need it to stay still
can somebody teach me how to rotate a brick without moving it or is this even possible
please help


while wait(0.2) do
script.Parent.rotate =script.Parent.Rotate + Vector3.new(1,1,1)
end
Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
27 Sep 2016 06:13 PM
script.Parent.Rotate =script.Parent.Rotate + Vector3.new(1,1,1)

not
script.Parent.rotate =script.Parent.Rotate + Vector3.new(1,1,1)
bc rotate is lower xD!


Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
27 Sep 2016 06:13 PM
and dont use Vector3 use a numerical value :)) forgot to fix that #tired


Report Abuse
killerbot29003 is online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
27 Sep 2016 06:28 PM
CFrame is much better, unless you want the supposed block to glitch out if something happens be on it (example.) CFrame prevents this from happening:

while wait(.2) do
script.Parent.CFrame = scrcipt.Parent.CFrame * CFrame.Angles(math.rad(1),math.rad(1),math.rad(1))
end

Search the internet if you want to find out what radians are.


This siggy is copyrighted ©
Report Abuse
RoReimer is not online. RoReimer
Joined: 12 May 2013
Total Posts: 170
27 Sep 2016 08:39 PM
thank you so much killerbot
but i found a new problem
the part is welded onto another part & although this script is only linked to the first part, both parts rotate together.
is there anyway to rotate just 1 part or is this impossible because of the weld?
I tried using constraints but nothing is working please help
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
27 Sep 2016 10:54 PM
part.CFrame = part.CFrame * CFrame.Angles(0,0,0)


Report Abuse
Thezi is not online. Thezi
Joined: 23 May 2014
Total Posts: 253
28 Sep 2016 05:24 AM
cframe is better


return thezi
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