Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need help to make this nuke show for everyone on the server?

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)



1 answer

Use FireServer to make whatever you need to appear, appear for everyone. On the server, everyone will see it.

2 comments

0

what about make the gui show for everyone

0

make the gui appear when you do :FireAllClients

This discussion is preserved as it was. New answers, comments, and votes are closed.