What do you want to achieve? Match the outline of the highlight to be the same color as the part. it is from a module table and idk how a module table works
What is the issue? right now its only hovered as grey (the default part color) and when hovered over a different color it remains grey
What solutions have you tried so far? this issue isnt found on the dev hub and yt
local modtable = require(script.ModuleScript)
local part = modtable.ChooseRandom():Clone()
local hover = Instance.new("Highlight")
local color = part.Color
hover.OutlineColor = color
hover.FillColor = Color3.fromRGB(0, 0, 0)
hover.FillTransparency = 0.75
hover.DepthMode = Enum.HighlightDepthMode.Occluded
local function onHover()
hover.Parent = part
end
local function onLeave()
hover.Parent = nil
end
This is because, you create and set the highlight once.
local modtable = require(script.ModuleScript)
local part = modtable.ChooseRandom():Clone()
local hover = Instance.new("Highlight")
hover.FillColor = Color3.fromRGB(0, 0, 0)
hover.FillTransparency = 0.75
hover.DepthMode = Enum.HighlightDepthMode.Occluded
local function onHover()
local color = part.Color
hover.OutlineColor = color
hover.Parent = part.Parent
end
local function onLeave()
hover.Parent = nil
end