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

Can you define a specific parameters?

Does Anyone know if it is possible to set a value to be in a specific spot for a parameter? Like, if I make a function called "PrintMeMessage" and have 2 params, one for the text and one for how many times to say the message, is there a way to only give how many times to repeat it?

1 answer

Use can use for loops for this.

function PrintMeMessage(message, amount)
    for i = 1, amount do
	print(message)
    end
end

PrintMeMessage("Hello World", 5)

1 comment

0

I just used that as an example. Sorry for that.

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