Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help with Gui?

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

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.