So i made a baseplate that switched color from Really red to Black every 3 seconds and i also made a script that checks every second if the color of the baseplate is really red.But the problem is that i only want the script to print once
Here is the script:
If you want it to print once then then why not just print when you change the color?
do i have to use a while true do loop then?
No, when you change the color, print it out. Here’s an example
part.BrickColor = BrickColor.new('Really red') -- code that changes the color
print(part.BrickColor) -- prints out the color
I think this must be what you want
Easy. Use an event.
game.Workspace.Baseplate.Changed:Connect(function(value)
if game.Workspace.Baseplate.BrickColor == BrickColor.new("Really red") then
print("Color changed to really red")
end
end)
I write it on mobile so Idk if I made any mistakes in the script.
Why complicate things though? When you can print the color when you change it lol
True as well. They said they wanted 2 different scripts so in that case it would fit
the problem is that the script only runs once
How is that a problem when you want it to print once?
you have to put the wait at the beginning or end of the while true do
i mean i want the script to print whenever the color of the baseplate is really red
Then put the print below the code that changes the color to really red? I really don’t get why you cannot do this.