the issue your having is related to the CurrentMonth being a string, not a number.
you can simply fix this issue by calling the tonumber function on the CurrentMonth variable
tonumber changes a string '124' to a number 124 (keep in mind the function breaks if there is anything other than numbers in the string)
example:
local CurrentMonth = os.date("%m")
print(
type(CurrentMonth)
)
print(
tonumber(CurrentMonth)
)
print(
type(
tonumber(CurrentMonth)
)
)
tostring changes any object into a type (stringified), although i wont go into any deeper explanation of this.
to fix your issue, you have to do one quick change:
local CurrentMonth = tonumber(os.date("%m"))
if CurrentMonth == 10 then
script.Parent.Stroke.Color = Color3.fromRGB(255,155,0)
end
here is a resource linking to the developer API that can explain this ten times better than i have
https://create.roblox.com/docs/scripting/luau/strings
hopefully this solves your problem :)
1 comment
I'll try this solution; thanks in advance!