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

Parameter for function question?

What does char or plr mean? is there a specific parameter for different functions?

1 answer

✓ Accepted answer

Yes.

I'd assume, from the wording of your question, that you're asking this regarding the ROBLOX wiki. I'll give you an example of how this works.

game.Players:GetPlayerFromCharacter(character)

This is a simple function to use a player's character to get a player object. The "character" variable is what we use to find this player.

For example,

local char = workspace.SystemUnderflow
local plr = game.Players:GetPlayerFromCharacter(char)

The name "char" or "plr" is just shorthand for "character" and "player".

When you give the function a variable that is not correct, then it will either error or return nil. So if you try to use a Player object instead of a character model, it'll return nil.

1 comment

0

One, question, is there a list of working parameters somewhere?

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