i want the fireserver to fire the player but it doesn’t
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!
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
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.
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
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