Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Parameter for function question?

Asked by 6 years ago

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

1 answer

Log in to vote
0
Answered by
DevNetx 250 Moderation Voter
6 years ago

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.

0
One, question, is there a list of working parameters somewhere? FlippinAwesomeCrew 62 — 6y
Ad

Answer this question