Fireclient is playing with me

  1. What do you want to achieve?

so my god damn fireclient wont stop firing

  1. What is the issue?

the fireclient sometimes it fires sometimes it doesn’t it only fires if i move this line


–sendchoosenplayer:FireClient(playerstable[choosenkiller], playerstable[choosenkiller])–

  1. What solutions have you tried so far?

i added a task.wait or even if statment to wait but it still doesn’t work

so as the title says the fireclient is playing with me, sometimes it does fire to the client sometimes it doesn’t


here is the local script it doesn’t print those three
i know there is no problem inside the local script
what do i do? and help is greatly appreciated

Assuming on what you code does, your goal is to make a single random player to be the “chosen killer” while printing the lines “” print(“GUI:”, gui.Enabled) print("Chosen team: … “”, and your issue is that sometimes none of the players print anything, right?

By the way, why is the “choosenplayer” parameter necessary in your local client script? If FireClient is sent to a random player to be “the chosen killer”, why do you pass as an argument the player itself? Maybe you can remove that and just use game.Players.LocalPlayer

2 Likes

kinda, but not like that, yes i want a single random player to be a “killer” which works!
and

inside this serversided module it does fire because it doesn’t print the “it didn’t fire” so we know that it does fire, BUT!!! the gui doesn’t appear on the killer vision and can’t press e, but if i were to add a task.wait before the fireclient fires then it works only 2 times and then it doesn’t
image
these are just to be sure it gets the event, by this u may figure this out, i mean i tried everything i know, maybe u know something i dont. thank you

not only that ive tried playing 10 times and out of those 10 plays only 2 of them i could see and press e as the killer

It’s because when you change the player’s character, you wipe their PlayerGui. Try setting the Gui to not reset on spawn if possible or, what you really should do, try to use humanoid descriptions since the player won’t reload in that case.

You also don’t need a bunch of those prints. The random number will always exist and correspond to a player. You also don’t need to check that the model you just parented to the workspace is in the workspace. Lastly you just set isloaded = true, so you don’t need to check if isloaded is true.

1 Like

i had resetonspawn on true, that’s why but thank you all

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