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

What is the point of Arguments? Also, are they really needed to make a good game??

Uhhhh, not for sure what they actually do, please simplify the topic for me, I would greatly appreciate it!

1 answer

You mean functions arguments? Well, they are very often necessary for the function to work properly.

Let's say you want to do something when a player joins, you do this:

game.Players.PlayerAdded:Connect(function(plr)
	--stuff
end)

The plr is an argument for the function you created. Without it, you wouldn't know what player joined.

3 comments

0

wait, but how do you know what to put there? Also, can you put "Player" to

0

You can put anything there. What you put there is what you are calling the player that joined.

0

If you make your own function, you can put anything there. If you set up a function as an event handler, then you should put the arguments listed on roblox wiki. Their names don't matter, it's just for you to recognise which one does what.

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