Remote Event Only firing Sometimes

Hi I’m Writing a Script that when you press a button it turns your character into a monster with some powers, however, the Remote Event Only works about Half the Time and I don’t know why? It Mainly Doesn’t Work in team tests

Server Script in serverScriptServices

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:FindFirstChild("WhoMonster")
local Players = game:GetService("Players")
local location = workspace.Button.StartButton
local playerlist = {}
local newcharamodel

--Button Pressed
location.ProximityPrompt.Triggered:Connect(function(player)
    --Chooses random player
	playerlist = {}
	for i, player in pairs(Players:GetPlayers()) do
		table.insert(playerlist, player)
	end
	local x = math.random(1,#playerlist)


    --Changes Character
	local oldmodel = workspace:GetChildren(playerlist[x].name)
	local charamodel = workspace.Monsters.MonsterCB.MonsterCB
	newcharamodel = charamodel:Clone()
	newcharamodel.Name = "StarterCharacter"
	oldmodel.Parent = nil
	newcharamodel.Parent = game.StarterPlayer
	player:LoadCharacter()
	newcharamodel:Destroy()
	oldmodel.Parent = workspace.Monsters.Playercharacter

    --Fires Remote Event
	remoteEvent:FireAllClients(playerlist[x])
end)


Local Script in StarterCharacterScript

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MonsterWho= ReplicatedStorage:FindFirstChild("WhoMonster")

local function test(monster)
      --code 
end

MonsterWho.OnClientEvent:Connect(test)

Replace this with:

local oldmodel = playerlist[x].Character

And…

FireAllClients will fire the remote event for every player.
If you want this, remove playerlist[x] from this line.

If you only want this remote event to fire for the selected player, replace the line with:

remoteEvent:FireClient(playerlist[x])

If there are still issues, let us know. :slight_smile: