Hello there.
I want to make the outline of this sign blink, but I have no idea how to do so.
What I tried at first was putting a Part Transparency changing script inside of each part I want to blink. It did work, but the scripts are so terribly out of sync, I decided to scrap that.
local model = script.Parent — Get the model (this script should be parented to the model)
local children = model:GetDescendants() —Gets the parts in the model
for _, child in pairs(children) do — Loop through the model
if child:IsA("BasePart") then — make sure it’s a part and not some random thing like a folder or something
child.Transparency = 0.5 — Change 0.5 to the transparency you want the part to be
end
end
Now if you want it to blink:
local model = script.Parent — Get the model (this script should be parented to the model)
local children = model:GetDescendants() —Gets the parts in the model
local on = true — When it is visible this will be true
local function transparencyChange(transparency)
for _, child in pairs(children) do — Loop through the model
if child:IsA("BasePart") then — make sure it’s a part and not some random thing like a folder or something
child.Transparency = transparency — The value we pass through the function
end
end
end
while wait(1) do
if on then
transparencyChange(0.5) — Change 0.5 to the desired transparency
on = false
else
transparencyChange(0) — Makes it fully visible again
on = true
end
end
while true do
w = workspace.Outline
wait(3)
w.Transparency=1
w.PointLight.Brightness=0
wait(1)
w.Transparency=0
w.PointLight.Brightness=1
wait(1)
w.Transparency=1
w.PointLight.Brightness=0
wait(1)
w.Transparency=0
w.PointLight.Brightness=1
end
Put a PointLight and this script inside your Union, and call your Union “Outline” and make sure the path is correct when defining W.
If you dont want to use the pointlight you can also change that to transparency or whatever property you like that achieves your Neon look.
local union = script.Parent -- Make the union the parent of the script
local trans = 0.5 -- Transparency number
while wait(1) do
union.Transparency = trans
wait(1)
union.Transparency = 0
end
This will make it blink transparent then back every second