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

No code provided, how can I check what "class" a player is in?

Asked by 5 years ago

So I'm making a class fighting game, and in order to give the player moves, I am gonna need to check what class they'd be in.

Without providing code, could you please explain how you would go about making this system?

2 answers

Log in to vote
0
Answered by
Prestory 1395 Moderation Voter
5 years ago
Edited 5 years ago

Personally what i would do for this is insert a string value into the player when they join the server and set this string value to the class the player has chosen then in the script you could check this string value and it would return the class they are.

0
oooo, i like this method. Gomenasa1 32 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Now it depends on what type of "Class Value" it is.The easiest way to make this is to simply add a String Value inside the Player,maybe inside it StarterPack,and edit it there.But if you wanna add stuff like when a player has triggered it class to change to maybe make explosions,particles etc. it best to use a RemoteEvent.

TL;DR Make a String Value inside the Player (StarterPack best) Add a script that checks the Class Value and returns with what code you want.

0
Why on earth would you put a StringValue into StarterPack? DeceptiveCaster 3761 — 5y
0
Doesn't matter where it is, i prefer putting it into StarterPack.It can work in StarterGui,PlayerScripts,StarterPack. DAsanicmaster 52 — 5y
0
StarterPack is not a good place to put it by any means. A StringValue should not be in the Backpack. DeceptiveCaster 3761 — 5y

Answer this question