Hello there!
I’m doing pixel art system for a game well but there is problem with resseting plates back to normal color when mouse is not focused on the part
The problem is I’m resseting all parts except for the part that is player focused, Well this is not working well and I dont know why
here is script:
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local TweenService = game:GetService("TweenService")
Mouse.Move:Connect(function()
local MousePointObject = Mouse.Target
if MousePointObject ~= nil then
if string.find(MousePointObject.Name,"Plate") then
TweenService:Create(MousePointObject,TweenInfo.new(0.5),{Color = Color3.fromRGB(255, 102, 189)}):Play()
for i,v in pairs(MousePointObject.Parent:GetChildren()) do
if v.Name ~= MousePointObject.Name then
TweenService:Create(MousePointObject,TweenInfo.new(0.5),{Color = Color3.fromRGB(223, 223, 222)}):Play()
end
end
end
end
end)
Thanks for any help!