Blip problem when player dies

So, I want to make a revive system that, when the player dies it will wait for 4 minutes with a timer. But that’s not the problem, the problem is that when the player dies and he presses the button to ask for help to a team called Hospital. When he presses the button the blip appears only for the people who are in the hospital team. But when the one that is in the hospital teams dies and he clicks the button, the blip appears to everyone except Hospital team.

local deadplr = game.Players.LocalPlayer
local notify = script.Parent.Notify

notify.MouseButton1Click:Connect(function()
    notify.Visible = false
    game.ReplicatedStorage.DeadNotification:FireServer(deadplr)
end)

game.ReplicatedStorage.DeadNotification.OnClientEvent:Connect(function(deadplr, ClonedPin)
    for i, v in pairs(game.Teams.Civilian:GetPlayers()) do
        if v then
            ClonedPin:Destroy()
        end
    end

end)

- Server Side Script
game.ReplicatedStorage.DeadNotification.OnServerEvent:Connect(function(plr, deadplr)
    for i, v in pairs(game.Teams.Hospital:GetPlayers()) do
        if v then
        local ClonedPin = game.Lighting["LocationPin Hospital"]:Clone()
        ClonedPin.Parent = deadplr.Character
        ClonedPin.Position = deadplr.Character.HumanoidRootPart.Position
            game.ReplicatedStorage.DeadNotification:FireClient(deadplr, v, ClonedPin)
        end
    end
end)
1 Like