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
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
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
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.