Model Transparency Changing Script

Hello there.
I want to make the outline of this sign blink, but I have no idea how to do so.
sign

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.

Thanks for any help.

1 Like

Is there a way for you have the outline as one part?

Then one script should solve this.

You can use one script that just loops through the parts in the model and changes their transparency

2 Likes

Well, if you mean a Union, then I’m not sure if it’ll work.

Yea, but I’m a complete goat at scripting. My only remarkable Skills are building.

Well something like this:

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

There might be typos I’m on mobile

2 Likes

Alright, I’ll test it out, thanks.

It doesn’t seem to work, and I followed instructions.

I can try to make it a union, so it’ll be much simpler.

Does anything happen at all with the script

No, all I could really see was the script NOT working, and when looking at the script it was underlined with red lines.

I switched it to a Union, maybe there’s a simpler script that could be used?

Here you go:

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.

The red lines mean errors, it’s most likely due to me being in mobile at the time

1 Like

Oh alright, no worries. I switched it into a Union anyways, so it should be simpler.

Alright well in that case, this should work:

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

1 Like

Thank you, I’ll try it out later on!

YES, IT WORKS! Thank you so much!