What do you want to achieve?
I’m making a game where you invade countries, and when you hover over a tile of each country, it should get brighter.
What is the issue?
The issue is on some countries, like Belgium and the Philippines, the color will be nowhere near the correct color, like hovering over a yellow Belgian tile causes it to turn green, and hovering over a banana-colored Ukraine tile turns it blue.
What solutions have you tried so far?
I’ve looked on Google, Bing, the Developer Hub, and nothing helped.
It just told me the same thing that would happen. Here is my code.
clickDetector.MouseHoverEnter:Connect(function(player)
local color = provincePart.Color
local red = color.R*255
local blue = color.B*255
local green = color.G*255
provincePart.Color = Color3.fromRGB(red+30, green+30, blue+30)
provincePart.Material = Enum.Material.Neon
showProvinceInfo:FireClient(player, provinceInfo, provincePart.Position)
end)
local h,s,v = country_color:ToHSV()
local howerColor = Color3.fromHSV(h,s,math.max(v-0.2,0))
Also firing that to a client is awfullest idea ever.
Just calculate it on a client because if you are making a game like HOI4, it will make network bandwidth completely full.