heya, so I am working on an outline script where, and everything works great except that when I click the part when the outline is green, it turns off, but doesn’t turn the outline to blue
code:
local mouse = game.Players.LocalPlayer:GetMouse()
local model = game.Workspace.Tire --replace with the model you want hilighted
model.ClickDetector.MouseHoverEnter:Connect(function()
model.Highlight.OutlineTransparency = 0
end)
model.ClickDetector.MouseHoverLeave:Connect(function()
if model.Highlight.OutlineColor ~= Color3.fromRGB(0, 255, 0)then
model.Highlight.OutlineTransparency = 1
end
end)
model.ClickDetector.MouseClick:Connect(function()
if model.Highlight.OutlineColor == Color3.fromRGB(0, 255, 0)then
model.Highlight.OutlineColor = Color3.fromRGB(0, 0, 255)
model.Highlight.OutlineTransparency = 1
end
if model.Highlight.OutlineColor ~= Color3.fromRGB(0, 255, 0)then
model.Highlight.OutlineColor = Color3.fromRGB(0, 255, 0)
end
end)
video of what happens:
robloxapp-20240505-0917167.wmv (1020.7 KB)