SurfaceGUI Buttons & Image Buttons Help

Hi all, been browsing for hours now and I still don’t really understand the answer to my problem. So, I’ve been trying to make a sort of computer where when you click a game icon, something happens (such as audio playing just for the player that clicked it). But during testing, I noticed that have the Surface GUI placed in a part in Workspace meant the button didn’t work when pressed. After looking for a topic regarding this issue, it said I need to have the Surface GUI in StarterGUI and set the “Adornee”. Did that, changed the variable holding the GUI’s location but then the GUI only started working on the server, not in any client. Did more browsing, then took what I found and did the script in a local script located in the GUI (that is still in StarterGUI), and found it only worked for the client that clicked the beginning button.

None of those solutions fit what I’m trying to achieve, which is a sort of computer that displays to everyone and can be used by everyone. And to sum this up, either it only plays on the server, or for the client that clicks anything.

If you know a way to make Surface GUIs appear to everyone and have any changes a player makes to it (by clicking a button for example) also appear to everyone, then I’d really appreciate it.

Not asking for a script, just how I would go about doing this, and what I’d use.

You’re on the right track you need to use a local script to control the GUI interaction and then you can fire events using RemoteEvents which is controlled in a server script!

Thanks, I’ll try that tomorrow! :smiley:

Hey so, I’ve done a quick example test, when the local script detects that a clickdetector has been clicked, it fires the RemoteEvent to make changes. The local player or any other player cannot see the changes made to the Surface GUI, but when I check on the server, the changes are made on that.

Could you send your code by any chance? you can also do this script server sided using the clickdetector.MouseClick event as it would change the surface GUI to all players.

Server Script:

local SCP = workspace["SCP-2987"]
local usbHum = SCP.FakeUSB.Humanoid
local RealUSB = SCP.RealUSB.USB
local FakeUSB = SCP.FakeUSB.USB
local USBAnim = usbHum:LoadAnimation(script.AnimUSB)
local Detector = SCP.Keyboard.Part.ClickDetector
local ReplicatedStorage = game:WaitForChild("ReplicatedStorage")
local SCP2987 = ReplicatedStorage.Intro_2987
local InUse = game.ReplicatedStorage.InUse

SCP2987.OnServerEvent:Connect(function(player, GUI)
	GUI.Adornee = game.Workspace["SCP-2987"].Monitor.Glass
	if InUse.Value == false then
		InUse.Value = true
		USBAnim:Play()
		wait(0.8)
		RealUSB.Transparency = 0
		FakeUSB.Transparency = 1
		for i = 1,20 do
			GUI.BootingUp.BackgroundTransparency = GUI.BootingUp.BackgroundTransparency - 0.05
			GUI.BootingUp.WindowsIcon.ImageTransparency = GUI.BootingUp.WindowsIcon.ImageTransparency - 0.05
			wait(0.05)
		end
		wait(0.5)
		GUI.BootingUp.Booting.Visible = true
		GUI.BootingUp.Booting.Text = "Downloading Drivers."
		wait(1)
		GUI.BootingUp.Booting.Text = "Downloading Drivers.."
		wait(1)
		GUI.BootingUp.Booting.Text = "Downloading Drivers..."
		wait(1)
		GUI.BootingUp.Booting.Text = "Downloading Drivers."
		wait(1)
		GUI.BootingUp.Booting.Text = "Downloading Drivers.."
		wait(1)
		GUI.BootingUp.Booting.Text = "Downloading Drivers..."
		wait(1)
		GUI.BootingUp.Booting.Text = "Drivers Downloaded"
		wait(2)
		GUI.BootingUp.Booting.Visible = false
		for i = 1,20 do
			GUI.BootingUp.BackgroundTransparency = GUI.BootingUp.BackgroundTransparency + 0.05
			GUI.BootingUp.WindowsIcon.ImageTransparency = GUI.BootingUp.WindowsIcon.ImageTransparency + 0.05
			wait(0.05)
		end
		GUI.DesktopFrame.DesktopImage.ImageTransparency = 0
	end
end)

Local Script:

local SCP = workspace["SCP-2987"]
local Detector = SCP.Keyboard.Part.ClickDetector
local GUI = script.Parent
local ReplicatedStorage = game:WaitForChild("ReplicatedStorage")
local InUse = game.ReplicatedStorage.InUse
local SCP2987 = ReplicatedStorage.Intro_2987

Detector.MouseClick:Connect(function()
	SCP2987:FireServer(GUI)
end)

So I should just do it with Click Detectors on part that hover above where the GUI is?

What are you trying to achieve here? changing the properties of a SurfaceGUI correct?

if so then you can easily achieve this using the Clickdetector.MouseClick event

Basically, I’m trying to make a computer screen that when you click on a app logo, it changes the properties of something else in the GUI, like make something visible.

But I want the changes to be visible by everyone, so I guess I could use ClickDetectors.

Do you have a GUI made for the app controls?

No, by App I just meant like you click it and a easter egg plays (such as music that comes from the game), but I got it working through click detectors, so thanks.