I don't understand the use for the [Command] function

In theory I think I’m getting it, but in practice, I deleted the command function and still got the same behavior the instructor got in the test he ran at ~9:50

Doesn’t seem like it’s being used?

I just realized I didn’t use the CmdSetDisplayName method in the context menu method, instead just used SetDisplayName… but this still worked o.o… so still unnecessary to use the [Command]?

You got me curious so I tested it out. If you include [Command], the host can SetMyName() on their own player, but if the host tries to run the function on another player, it throws a warning saying you don’t have authority.

If you omit [Command], then you can SetMyName() on other players without a warning. [Command]'s function seems to be to enforce that authority limit.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms