Okay! So I am making a script so that if you click a screen GUI button, a GUI will pop up on all players screen.
Local script (For Button) ``script.Parent.MouseButton1Click:Connect(function() local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage")
local client = Players.LocalPlayer ReplicatedStorage.ShowImage.OnClientEvent:Connect(function(visible) local StarterGui = game:GetService("StarterGui") local gui = StarterGui:WaitForChild("ScreenGui") local Gui2 = gui:WaitForChild("Data") local guiToDuplicate = Gui2:WaitForChild("Frame") local PlayerGui = game.Players:WaitForChild('PlayerGui') local duplicatedGui = guiToDuplicate:Clone() local reset = game.Players.LocalPlayer.Name duplicatedGui.Parent = client.PlayerGui.ScreenGui.Data duplicatedGui.Visible = true duplicatedGui.Name = reset duplicatedGui.TextLabel.Text = reset.."'s" .. " Server" end) end)
I have a Remote Event called ShowImage in Replicated Storage.
Server Script (In ServerScriptService)
`` local ReplicatedStorage = game:GetService("ReplicatedStorage")
ReplicatedStorage.ShowImage.OnServerEvent:Connect(function(player) ReplicatedStorage.ShowImage:FireAllClients(true) end)
When I try to run it, nothing happens. If somebody can tell me where I am making a mistake I would be thankful!