MrGamingZB
(MrGamingZB)
December 1, 2021, 11:55pm
#1
Hello,
I am still new to scripting, I made this script to change a Color3Value when clicking a button. The script is below and does not work.
Does anyone know why this is not working?
black.Activated:Connect(function()
game.StarterPlayer.StarterPlayerScripts.BubbleChatSettings.BackgroundColorValue.Value = Color3.fromRGB(57, 59, 61)
game.StarterPlayer.StarterPlayerScripts.BubbleChatSettings.TextColorValue.Value = Color3.fromRGB(250, 250, 250)
end)
Is the button a TextButton
/ ImageButton
? Then otherwise the Activated
event will not work because it doesn’t exist at all. Try using the MouseButton1Down
event instead of that one.
MrGamingZB
(MrGamingZB)
December 2, 2021, 12:05am
#3
It is a TextButton
. I have used this in all my UIs and I have not had any issue, but I will try.
Also, the code is returning this error shown below. I’ll let you know when I find a solution for this issue.
Try this script:
local chat = game:GetService("Chat")
black.MouseButton1Down:Connect(function()
pcall(function()
chat:SetBubbleChatSettings({
BackgroundColor3 = Color3.fromRGB(0, 255, 255), --Customize
TextColor3 = Color3.fromRGB(255,0,0), --Customize
})
--print("done")
end)
end)
The bubble will look like this, but you can customize it to your preference. Hope this helps
1 Like