Suixle
|
  |
| Joined: 12 May 2012 |
| Total Posts: 231 |
|
|
| 05 Sep 2012 07:39 PM |
| Well, I attempted to make a script that makes a brick start up like a fan, slow at first, then it goes fast, but I failed All I could make was make the block start fast, then slow down, which was not what I wanted. Can someone help me make the script I wanted. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2012 08:10 PM |
http://wiki.roblox.com/index.php/Cframe
Use the Rotation Stuff in That |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2012 08:33 PM |
Should be roughly like this
speed = 0 maxSpeed = math.pi/2 --max. 90 degrees turn, half a radian active = false
function speedUp()
active = true
while speed + 0.1 < maxSpeed do --add speed until we reach the maximum speed = speed + 0.1 end
speed = maxSpeed
end
function speedDown()
while speed - 0.1 > 0 do speed = speed - 0.1 end
speed = 0 active = false
end
while wait() do if active then brick.CFrame = brick.CFrame * CFrame.Angles(0, speed, 0) --changes rotation Y end end |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2012 08:46 PM |
| gah I'm stupid, forgot a wait() in all the while loops. It should wait for a fraction of a second between speed changes AND CFraming if you actually want to see anything. >.> |
|
|
| Report Abuse |
|
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
| |
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
| |
|