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

Help with Gui?

Asked by
FiredDusk 1466 Moderation Voter
9 years ago

When I click this TextButton the text located in Frame changes to Arial. Then if I click another TextButton that SHOULD make it to Legacy, it does not.

a = script.Parent

a.MouseButton1Down:connect(function()
    game:GetService('RunService').RenderStepped:connect(function()
        for _,v in pairs(game.Players.LocalPlayer.PlayerGui.ChatGui.Frame:GetChildren()) do
            coroutine.resume(coroutine.create(function()
        if v.ClassName == 'TextLabel' then
            v.Font = 'Arial'
        end
            end))
        end
    end)
end)

1 answer

Log in to vote
0
Answered by
xuefei123 214 Moderation Voter
9 years ago

If its a TextButton then you need to,

a = script.Parent

a.MouseButton1Down:connect(function()
    game:GetService('RunService').RenderStepped:connect(function()
        for _,v in pairs(game.Players.LocalPlayer.PlayerGui.ChatGui.Frame:GetChildren()) do
            coroutine.resume(coroutine.create(function()
        if v.ClassName == 'TextLabel' then--Needs to be TextButton, because its not a TextLabel
            v.Font = 'Arial'
        end
            end))
        end
    end)
end)
Ad

Answer this question