-
I am trying to make a system where you can identify people who have the same role as you. A red box appears around both of the people who have the same role.
-
I used a function to activate whenever this happens:
In the function it shows this:
Local script:
Ouput:
Btw game.ReplicatedStorage.RoleValues is here:
(The role value values go higher when a role gets picked.) (There’s also rolevalues located in the player. They get higher when the player is that role. -
I’ve tried to look on devforum but can’t find anything similar to this.*
What is “role” set to? I am talking about the local function in the server script.
I posted a screenshot here. Is this what you were talking about?
The first parameter of a remote event being received on the server is always the player.
Do I make a second parameter for the remote event?
The player
parameter is passed by default to the server, therefore role
gets equal to player
. Instead you should replace function(rolethingy)
with function(player, rolethingy)
.
What were you trying to do?
If I am not wrong, you tried to find a string called “Werewolf” in the player, which is impossible to my knowledge.
(Nevermind, I just remembered what [] does.)
Okay, I will go do that right now. Is that all that is wrong?
Well this is the reason the topic was made, your code may have other bugs/vulnerabilities which are irrelevant to the current discussion.