What kind of loop would you use if you wanted the loop to keep on going while the rest of the script kept going also because I know some loops you can't do that but I'm not sure which loop can go on while the other parts of the script also go on.
I will not make a script for you, this seems like a request. But I will help by giving you some loops that I use:
--The "for" loop: for i = 1, 10 do --Repeats everything before end 10 times print(i) --prints how many times it has repeated end --The repeat, until loop: repeat if value == true then --To make sure you do not get stuck in a loop break --Break the loop if value is true end wait() until value == true --the "function" loop as I call it: function RepeatMe() --code RepeatMe() --makes RepeatMe loop --If you do not want it to be infinite then add an if statement or something like --[[ if repeat == true then RepeatMe() end ]]-- end RepeatMe() --Starts the loop --The while loop: while true do print("OMG HAX") wait() --ADD A WAIT! Otherwise the script will overload the game! end --or you can do while value == true do print("OMG HAX") if value == false then break --Break the loop in case it gets stuck end wait() --ADD A WAIT! Otherwise the script will overload the game! end --That's about all I can think of so far...
If you are making a minigame game or something that has rounds then I recommend the function loop.