i am trying to make a obby that has a nuke dev product, my goal is to make this show for everyone, the issue is that i used fireallclients to make the gui show for everyone and kill everyone except the player who bought the dev product but it only shows for the player(local script), please help me fix it
local textlabel = game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("TextLabel")
local player = game.Players.LocalPlayer
local PlayerNotToKill = player
local id
local message = " has launched the nuke!"
local function write(o, t)
for i = 1, #t, 1 do
o.Text = string.sub(t, 1, i)
wait(0.1)
end
end
local function kill()
for _, p in pairs(game:GetService("Players"):GetPlayers()) do
if p.Character and p ~= PlayerNotToKill then
p.Character:BreakJoints()
end
end
end
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr, purchased, success)
if success and purchased == id then
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
write(textlabel, plr.Name..message)
wait(1)
game.ReplicatedStorage.Kill.OnClientEvent:Connect(kill)
wait(3)
textlabel.Text = ""
end)
end
end)

2 comments
what about make the gui show for everyone
make the gui appear when you do :FireAllClients