I am having a problem trying to get a ScreenGUI to show to all players from the click of a clientside GUI (Only 1 person has access to the button). The Gui is meant to be a series of messages that pop up on a user’s screen once the button is clicked. I have provided all associated codes below. Please note that I have tried multiple different scripting techniques to get it to work.
The GUIs show up fine clientside but are virtually non-existent to anyone else.
The audio is serverside, however, and everyone can hear the audio.
Please note: I am using RemoteEvents, activated from a LocalScript (a child of the button), and the command is used in a ServerScript. I used this technique with a jump disabling system, but it isn’t seeming to work for the GUIs.
LocalScript (Child of the ClientSide GUI TextButton)
function onClick()
game.Workspace.ControlPanelTest.cruiseannc:FireServer()
end
script.Parent.MouseButton1Down:Connect(onClick)
ServerScript (With the command)
local Players = game:GetService("Players")
game.Workspace.ControlPanelTest.cruiseannc.OnServerEvent:Connect(function(Player)
game.Workspace.ControlPanelTest.AudioBlock.DingDong.Playing = true
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame1.Visible = true
wait(4)
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame1.Visible = false
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame2.Visible = true
wait(7)
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame2.Visible = false
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame3.Visible = true
wait(9)
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame3.Visible = false
Player:WaitForChild('PlayerGui'):WaitForChild('Cruising').Frame4.Visible = true
end)
ServerScript (A different technique)
local Players = game:GetService("Players")
game.Workspace.ControlPanelTest.cruiseannc.OnServerEvent:Connect(function(plr)
game.Workspace.ControlPanelTest.AudioBlock.DingDong.Playing = true
plr.PlayerGui.Cruising.Frame1.Visible = true
wait(4)
plr.PlayerGui.Cruising.Frame1.Visible = false
plr.PlayerGui.Cruising.Frame2.Visible = true
wait(7)
plr.PlayerGui.Cruising.Frame2.Visible = false
plr.PlayerGui.Cruising.Frame3.Visible = true
wait(9)
plr.PlayerGui.Cruising.Frame3.Visible = false
plr.PlayerGui.Cruising.Frame4.Visible = true
end)
Please note: I tried multiple other ways of doing it, but could not get it to work serverside. I am a relative amateur at scripting, so any help is appreciated.
The goal is to get the GUI to appear on all player’s screens at the activation of the button, rather than clientside to the person activating said button.