Categories > Coding > Lua >

How do I disable TextButton background changing (if it's possible)?

swiney2

swiney2#8267

vip

Posts: 197

Threads: 8

Joined: Jul, 2021

Reputation: 20

Posted

This may be a dumb question but I dont have alot of experience with Roblox Studio

Whenever I hover over a TextButton, the background gets darker,

Is it possible to prevent this from happening?

  • 0

Im not really active anymore, so alot of my information isnt updated. 

https://media.discordapp.net/attachments/836952000876511252/950508582892367912/pigeon_siggy.png

hookfunction

fake wumat

vip

Posts: 119

Threads: 15

Joined: Aug, 2021

Reputation: 18

Replied

local script inside of the button :

script.Parent.AutoButtonColor = false

  • 0

                                                                        https://cdn.discordapp.com/attachments/909012795851407390/927492917394821140/siggy.png

MINISHXP

[REDACTED]

Posts: 813

Threads: 3

Joined: Jan, 2021

Reputation: 9

Replied

you can make a renderstepped hook and make a loop to change it to your needed color all the time so it will be unchangeble

something like:

-- Lets say that the parent of this localscript is the button
local btn = script.Parent
game:GetService("RunService").RenderStepped:Connect(function()
    btn.BackgroundColor3 = Color3.fromRGB(35, 35, 35) -- change the color to ur own
end)
  • 0

Added

@hookfunction I FORGOT ABOUT THAT I MADE IT SO MORE OVERCOMPLICAYED LOPOEHYGiuehgeb

  • 0

swiney2

swiney2#8267

vip

Posts: 197

Threads: 8

Joined: Jul, 2021

Reputation: 20

Replied

  • 0

Im not really active anymore, so alot of my information isnt updated. 

https://media.discordapp.net/attachments/836952000876511252/950508582892367912/pigeon_siggy.png

hookfunction

fake wumat

vip

Posts: 119

Threads: 15

Joined: Aug, 2021

Reputation: 18

Replied

@MINISHXP LMAOO

  • 0

                                                                        https://cdn.discordapp.com/attachments/909012795851407390/927492917394821140/siggy.png

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )