I was experimenting rubbles movement when being drilled, to solve this, I wanted to add a math.random onto my script, and added while true do and I receive an error.
My error:
Workspace.Drill.ParticlePart.Script:18: 'end' expected (to close 'while' at line 5) near '<eof>'
My Script:
local r = math.random(1, 100)
local s = script.Parent.ParticleEmitter
n = 20
wait(3)
while true do
if r > 0 and r < 25 then
s.Size = NumberSequence.new(.25)
s.Rate = n
elseif r > 25 and r < 50 then
s.Size = NumberSequence.new(.3)
s.Rate = n
elseif r > 50 and r < 75 then
s.Size = NumberSequence.new(.35)
s.Rate = n
elseif r > 75 and r < 100 then
s.Size = NumberSequence.new(.4)
s.Rate = n
end
What am I doing: I wanted to add a wait() on a loop command, however, I don't know what to do in order to fix the error, if there's any simpler way... please help c:

1 comment
ah thanks man.