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
 

Can Someone help me?

Previous Thread :: Next Thread 
HahaSamus is not online. HahaSamus
Joined: 20 Apr 2012
Total Posts: 11
27 Apr 2012 09:07 PM
I am trying to make a brick randomly rotate. I just can't get it. My script is:
while true do
Test6.CFrame = CFrame.new(60.5, 11.8, 86.5) * CFrame.angles(Vector3.random)
end


Would I need to define what Test6 is? because I only get error messages on 'Angles' it doesn't give me any other error messages other than that.
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
27 Apr 2012 09:31 PM
Vector3.random isn't defined. You need to do this:

Vector3.new(math.random(),math.random(),math.random())

With the start and end values (Likely 1 - 360 or something).
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
27 Apr 2012 11:04 PM
You need a "wait()" somewhere in that While true do function.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
27 Apr 2012 11:42 PM
@thecaptain

It's a loop, not a function.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
28 Apr 2012 12:29 AM
Still, You need a "wait()" in it.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
28 Apr 2012 12:37 AM
Yesh you do.
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
28 Apr 2012 03:03 AM
You'll need to set a vector3 and continuously add it to the new one. And, you should put a wait() to avoid it crashing your studio.


"Knowledge talks, wisdom listens."
Report Abuse
HahaSamus is not online. HahaSamus
Joined: 20 Apr 2012
Total Posts: 11
28 Apr 2012 09:03 AM
Thank you soo much. Everyone.
Report Abuse
davidstinson is not online. davidstinson
Joined: 06 Feb 2010
Total Posts: 128
28 Apr 2012 09:18 AM
put a wait()
i would sugest
wait(0.5) or less
Report Abuse
HahaSamus is not online. HahaSamus
Joined: 20 Apr 2012
Total Posts: 11
28 Apr 2012 08:33 PM
I figured it out to those that want to know. The way I used was:

function SpinBlock(Spin, PauseTime)

script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.fromEulerAnglesXYZ(Spin, Spin, Spin)
wait(PauseTime)
end

local XYZ = 0.0;

while true do
for i = 0, 9 do
SpinBlock(XYZ, 0.1)
XYZ = XYZ + 0.1;
end;
end


Thanks all.
Report Abuse
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
28 Apr 2012 08:34 PM
You should use a wait(.5)
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