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

Can I have help making a nuke?

So I was trying to make a nuke and this is what I have so far but it does not work.

script.Parent = Nuke

function nuke()
Nuke.Size = Nuke.Size + Vector3.new(.5,.5,.5)
repeat until 
Nuke.Size = Vector3.new(100,100,100)
	end
end

script.Parent.Touched:connect(nuke)

1 answer

✓ Accepted answer

When using repeat, the statement that you want to be executed each time has to be between the "repeat" and "until" keywords.

Here's an example from the wiki: http://wiki.roblox.com/index.php?title=Repeat#The_.27repeat.27_Statement

a = 0
repeat
	a = a + 0.1
until a == 1
print("a equals to 1!")

In your code, you are increasing the size outside of the repeat loop. So the repeat loop is basically doing nothing.

1 comment

0

Ok I get it now, thanks

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