local lit = script.Parent
local lit2 = script.Parent.Parent
local looping = false
local loopThread = nil
-- Function to start flashing
function StartLooping(RequiredColor)
if looping then return end
looping = true
loopThread = coroutine.create(function()
while looping do
lit2.Color = RequiredColor
task.wait(0.1)
lit2.Color = Color3.fromRGB(0, 0, 0)
task.wait(0.1)
end
end)
coroutine.resume(loopThread)
end
-- Function to stop flashing
function EndLooping()
looping = false
lit2.Color = Color3.fromRGB(0, 0, 0)
end
-- Listen for changes to the BoolValue's Value property
lit:GetPropertyChangedSignal("Value"):Connect(function()
if lit.Value == true then
StartLooping(lit.BeepColor.Value)
else
EndLooping()
end
end)
#why wont this work
1 messages · Page 1 of 1 (latest)
Errors? Warnings? Have you tried debugging with prints or anythingm
What type of script is it and where
Serverscript and in a boolvalue
Where's the bool value
In a meshpartr
Does changing the color of the meshpart in studio change its color
Yes
So your looking to change the book value serverside and see the meshpart change in color
Or am I wrong
Ig flicker on color is better to say