I am making a script where it changes the style when it is clicked. Yes this script works and it is in a for loop but this part of the script does not work. Everything else does, just not this.
1 | if v.Style = = "RobloxRoundDefaultButton" then -- there are no errors for this part |
2 | v.Style = "RobloxRoundButton" |
3 | else |
4 | v.Style = "RobloxRoundDefaultButton" |
5 | end |
Ah, I see
v.Style is a ENUM, not a string!
so...
1 | if v.Style = = 4 then -- there are no errors for this part |
2 | v.Style = 3 |
3 | else |
4 | v.Style = 4 |
5 | end |
see the wikidocumentation
http://wiki.roblox.com/index.php?title=API:Enum/ButtonStyle (I might not be doing this right, and if I'm not, just remove the "" 's)