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

How do change all players gui inside a normal script? without using remote functions [Not Answered]

Asked by
CjayPlyz 643 Moderation Voter
5 years ago
Edited 5 years ago

How do change all players gui inside a normal script?

How do i change all players playergui using a normal script in the workspace. I wan't to change the text of the textlabel for all players, The location of what i wanna change StarterGui.ScreenGui.TextLabel.Text.

P.S if possible i don't wanna use remote functions. But else something like this. --edited

while true do

    local players = -- refers the variable for all players

    for i = 1, 30, - 1 do
        players.PlayerGui.ScreenGui.Textlabel.Text = i
        if i == 0 then
            break
        end
    end

end
0
is that even possible? CjayPlyz 643 — 5y
0
Yes, it is. steven73598233 75 — 5y
0
You should use FireAllClients(). For a timer of only 30 seconds, firing every second wouldn't be that expensive (if you're worried about lag). I'm also confused on why you have a for loop inside a while loop with no wait() in either. PreciseLogic 271 — 5y
0
don't worry its just an example its not the script i have, by the way what do you mean by "You should use FireAllClients(). For a timer of only 30 seconds". CjayPlyz 643 — 5y
View all comments (3 more)
0
do you mean i need do something like this : (line1) for i = 1, 30, - 1 (line2) workspace.event:fireallclients(i) (line3) wait(1) (line4) end CjayPlyz 643 — 5y
0
then on the local script is like (line1) workspace.event.OnClientEvent:Connect(function(i) (line2) script.Parent.text = i (line3) end CjayPlyz 643 — 5y
0
FireAllClients is basically saying FireClient to every player in the game the8bitdude11 358 — 5y

1 answer

Log in to vote
2
Answered by
Rhythic 36
5 years ago

You should use RemoteEvents that connect to the client. From there you should :FireAllClients() and change the GUIs from the client.

0
Sorry i need to change it from the server script. CjayPlyz 643 — 5y
Ad

Answer this question