So I am trying to wrap my head around how Event Parameters work. But this is how I understand them so far…
So let’s take:
local playerService = game:GetService("Players")
local function playerAdded(player)
print(player.AccountAge)
end
playerService.PlayerAdded:Connect(playerAdded)
So we have PlayerAdded Event which takes in the parameter player. In the API it says that the player parameter stands for a “Player Object”.
So does that mean… the parameter of the event already knows all of the properties such as AccountAge property or another property like Character, which is the reference to a model with a humanoid as the API states… so thats why in some scripts people do if player.Character then and then they attach it to the CharacterAdded event.
So in conclusion… is that how these parameters work? If so I might have just revolutionised my way of thinking because I have been stupidly reading things.
In the parameters section here, it says (same as you said) that the first (and only) parameter is a Player object. There is a link there, which if you click it, takes you to the page for Player objects here.
Player objects contain all of the information such as account age, character, name, :Kick(), etc.
No that’s pretty much all I wanted to know and be reassured on. And since you and Jarod answered my question I’ll do a randomiser and give whoever which person the solution.