Basically, I want this part to go from neon to plastic back and forth to simulate a beeping effect during an event.
This is the things I want:
1-Beep.
2- If also possible could this script could only last for 15 seconds and then the part goes back to plastic.
And this is the script I attempted.
if game.Workspace.Values.startup.Value == true then
script.Parent.Material = Enum.Material.SmoothPlastic
wait(0.5)
script.Parent.Material = Enum.Material.Neon
wait(0.5)
end
while game.Workspace.Values.startup.Value do
script.Parent.Material = Enum.Material.SmoothPlastic
task.wait(0.5)
script.Parent.Material = Enum.Material.Neon
task.wait(0.5)
end
Hey one more question, I have made another value for a startup failure. I wanted to know how to select a random number as a start up failure and a normal start up. How do I do a script like this.
So far, this is my current progress of a script.
Basically, I want the normal start up to have an higher chance then failedstartup.
local chance = math.random(0,50)
if chance == 1 then
game.Workspace.Values.FailureStartup.Value = true
end
local chance = math.random(0,100)
if chance <= 60 then
game.Workspace.Values.FailureStartup.Value = true
end
You can change the number 60 to how easy you want normal startup to run, rn its set to 60 which means it will have a 60% chance of running, the higher you set that number = the higher the chance Hope this helped!