Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can this rotating script be made smaller?

Hello is there anyway that this script can be made smaller?

local dice = script.Parent

while true do
dice.Orientation = Vector3.new(38.12,-96 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-97 ,-45.6)	
wait(0.01)
dice.Orientation = Vector3.new(38.12,-98 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-99 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-100 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-101 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-102 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-103 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-104 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-105 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-106 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-107 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-108 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-109 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-110 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-111 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-112 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-113 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-114 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-115 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-116 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-117 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-118 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-119 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-120 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-121 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-122 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-123 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-124 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-125 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-126 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-127 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-128 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-129 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-130 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-131 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-132 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-133 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-134 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-135 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-136 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-137 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-138 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-139 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-140 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-141 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-142 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-143 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-145 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-146 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-147 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-148 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-149 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-150 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-151 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-152 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-153 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-154 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-155 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-156 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-157 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-158 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-159 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-160 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-161 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-162 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-163 ,-45.6)
wait(0.01)
dice.Orientation = Vector3.new(38.12,-164 ,-45.6)
end**

1 comment

1

You could use a for loop or a while loop, but only incrementing the y value.

1 answer

✓ Accepted answer

Yes, it can!

local dice = script.Parent


while true do
wait(0.05)
dice.CFrame = dice.CFrame * CFrame.new(0,0,0.05)
end)

You can tamper around with this, see what you get.

4 comments

0

Its not rotating it , its moving it towards the XYZ

0

Instead of CFrame, do Orientation.

1

dice.Orientation = dice.Orientation * Vector3.new(0,0.05,0)

0

i did dice.Orientation = dice.Orientation + Vector3.new(0,0.05,0) and it works as i wanted thanks all!

This discussion is preserved as it was. New answers, comments, and votes are closed.