Its a bit confusing
what are parameters and what do they do?
2 answers
A parameter is a special instance that a function could have. For example:
local Players = game.Players
Players.PlayerAdded:Connect(function(Player)
print(Player.Name)
end)
In the code above it will print the name of any player that joins the server. The parameter can be named whatever but in the player added event it will always be the player that is added. You can try the script out for yourself if you want to play around with it. Second Example:
local Part = script.Parent
Part.Touched:Connect(funtion(Hit)
Hit.BrickColor = BrickColor.Random()
end)
In the example above Hit is the part that touches the scripts Parent. You can always check if a function has a parameter by looking at the object browser in the view menu.
3 comments
that would be an argument, as opposed to a parameter
oops
I'm not sure if theking48989987 is correct on that. A parameter is the variable declared in the method's definition (the general/universal instance), whereas an argument is a specific instance that is passed to that method.
Below is an example:
game.Players.PlayerAdded:Connect(function(player)
In the example above, 'player' is the player that joins the game.
If we wanted to use the parameter to print the player's name then we would do the following.
game.Players.PlayerAdded:Connect(function(player)
print(player.Name)
The above script would print the player's name into the output
'player' could also be called plr, it doesn't matter. However remember that we would have to say the following:
game.Players.PlayerAdded:Connect(function(plr)
print(plr.Name)
1 comment
You forgot the "end)" in those events lmao
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
look it up on yt
there are better sources than youtube
By the way the following link is a great way to learn about studio and how to use it: https://developer.roblox.com/learn-roblox/all-tutorials#all
I personally think that lua pil is best for core principles of lua