Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Global Surface Gui in FE mode?

Asked by 6 years ago

Hello,

I've made a surface Gui that only works in Studio Solo mode, I've set the Gui to StarterGui and set its Adornee to the part. I've tried changing some text labels' text within the Gui in 2 ways. None of them work and I don't know what to do.

Before you continue: If you know what I can do, you do not need to give the script, you can tell me what I need to do.

Explanation how I made it "work"

A screen Gui in one client fires a remote event on ReplicatedStorage.
A script in the workspace is activated and fires AllClients

Ways I tried to do it but didn't work.

I've tried the following 2 ways.

--Way 1

    -- local script in surfaceGui is fired after the script in server fireAllClients

    game.ReplicatedStorage.UpdateGateInfo.OnClientEvent:Connect(function(plr,value)
        script.Parent.TextLabel.Text = value -- Value is a string
    end)

--Way 2

    -- Script in workspace is fired from the remotEvent which was fired from a ScreenGui

    local plrs = game.Players:GetPlayers()
    for i = 1,#plrs do´
        plrs[i].PlayerGui.SurfaceGui.TextLabel.Text = "Test"
    end

I don't know what else to do,

I don't know if this helps with the issue but a script I have in the SurfaceGui only works in Studio Solo as well. It doesn't do anything, it should get os.date but it doesn't do anything. PS: The os.date script is a script inside surface gui, as I was getting errors with Local scripts in Studio Solo.

0
No don't use a server script to loop through GUIs. User#19524 175 — 6y
0
I agree with that. The PlayerGui is part of the client and you can't access that in the server saSlol2436 716 — 6y

1 answer

Log in to vote
0
Answered by
vkax 85
6 years ago
Edited 6 years ago

You don't need a remote event since it's the server sided. What you should do is make it change messages to what you want. For example:

local text = {"hi","no","4"}
while true do
for i,v in pairs(text) do
workspace.SurfaceGui.TextLabel.Text = v
wait(5)
end
end

Anyways, hope you can take my technique, it's basic.

0
Dammn, didn't even think about that.. It was looking to simple so I never tried it. It works, thank you so much. AvionicScript 65 — 6y
Ad

Answer this question