Fireserver doesn't fire the player

  1. What do you want to achieve?

i want the fireserver to fire

2 What is the issue?

i want the fireserver to fire the player but it doesn’t

  1. What solutions have you tried so far?

i tried something but it didn’t work

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

here are the codes


server script

server module script

local script

im a new scripter and im trying to improve but i get stuck on these cases and i dont really know what to do, i tried going to the roblox documentation but no help, any help and reply is appreciated

try adding a delay before the fireclient() is triggered

it doesn’t work here is the output


and it does change the player’s model and team

but i cant press e as the killer and the gui isnt enabled

and i think i need to sent the player inside the fireserver but isnt playertable[choosenkiller] the choosen player? that is what im not understanding

there’s a thing with remote events:

  • FireClient accepts first parameter a destination player
  • OnClientEvent does not get that player

so if you want to pass parameters to some client FireClient should look like
event:FireClient(destinationClient, param)
in this case client gets the param as

event.OnClientEvent:Connect(function(param)
end)

there’s also FireAllClients which sends to all clients and this might suit better in your scenario.

3 Likes

im so so sorry, but i still dont understand? like the destinationclient are u referring to the player? and this is how it should look like? sendchoosenplayer:FireAllClients(playerstable, playerstable[choosenkiller]), again sorry if the line is wrong

most likely
sendchoosenplayer:FireAllClients(playerstable[choosenkiller])
so each player gets the killer

1 Like

yeah it works!, thank you so much!!! is it the same with fireserver?? again thank you so much, i remember doing it the same as u did u but it didn’t work!

well, there is one more problem, i dont know if u are still here but the survivors get the gui and press e while the killer cannot, and what doesn’t make sense is i have a line


where it says if the choosenkiller.teamcolor is to killer.teamcolor then they are able to press e but the survivors are a different team to killer, any reason why its doing that? and the print(choosenplayer) it prints the killer, if player 2 is the killer it would print player2 but he couldn’t see the gui neither pressing e

here is a clear photo