I'm a web based developer so this is confusing me a little. I know how to make a click-down animated button, similar to how ones like "Ask Question" are here on Scripting Helpers, it would be:
.button { padding: 15px 25px; font-size: 24px; text-align: center; cursor: pointer; outline: none; color: #fff; background-color: #4CAF50; border: none; border-radius: 15px; box-shadow: 0 9px #999; } .button:hover {background-color: #3e8e41} .button:active { background-color: #3e8e41; box-shadow: 0 5px #666; transform: translateY(4px); }
, However, i'm trying to do this in a GUI on ROBLOX. Is there any forum explaining animated GUIs, or can someone explain this to me a little? Thanks in advance.
It'd be hard for people who don't know HTML to understand this, so in future please try to explain what the functions do.
But for the button:hover
thing I think you're going towards something like
local button = script.Parent --Define the button button.MouseEnter:connect(function() --Mouse hovers over button.BackgroundColor3 = Color3.new(62/255,142/255,65/255) --Change the Background color, always uses Color3 end) button.MouseLeave:connect(function() --Mouse isn't hovering button.BackgroundColor3 = Color3.new(76/255,175/255,80/255) --Change the Background color, always uses Color3 end)
But for that translate and active thing, I'd have no clue.
Hope I helped
TheHospitalDev
To translate Hex codes to RGB codes which Lua uses, you could use this like I did
Most users don't know how to make this. I'd rather ask a developer then Scripting Helpers.