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

Player GUI Changing Text?

Asked by
turf23 0
9 years ago

how do i change the text in a gui for all of the players

0
no turf23 0 — 9y
0
Atleast try to make the script, please.. HungryJaffer 1246 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
local guiname  -- name of the gui there
local textlabel -- name of the textlabel there

for _, player in pairs (game.Players:GetPlayers()) do
    if player:findFirstChild("PlayerGui") then
        if player.PlayerGui:findFirstChild(guiname) then
            if player.PlayerGui[guiname]:findFirstChild(textlabel) then
                local text = player.PlayerGui:WaitForChild(guiname):WaitForChild(textlabel)
                text.Text = "Something" -- the text
            end
        end
    end
end
0
please put into a code block turf23 0 — 9y
Ad

Answer this question