Hello people I have a problem so I was just messing around with a script and decided to make a loop but only two lines of code runs instead of the full three
here’s my script and no there isn’t any errors
hotdog = 1
while hotdog <5 do
game.Workspace.Part.BrickColor = BrickColor.new(“Really red”)
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new(“White”)
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new(“Neon orange”)
end
it turns red and white but the orange part doesn’t run
1 Like
Harishxx
(Windy)
April 27, 2021, 3:00pm
#2
This is because you don’t put a wait()
after you changed the BrickColor to Neon Orange. Try this:
hotdog = 1
while hotdog <5 do
game.Workspace.Part.BrickColor = BrickColor.new(“Really red”)
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new(“White”)
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new(“Neon orange”)
wait(1)
end
2 Likes
hmm it completely stopped working when i added your script to replace mine
It’s probably because of the unicodes. Replace “
with a normal double quote.
1 Like
I already did still isn’t working
local hotdog = 1
while hotdog < 5 do
game.Workspace.Part.BrickColor = BrickColor.new("Really red")
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new("White")
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new("Neon orange")
wait(1)
end
It should look something like this?
That is what i exactly have rn but it isn’t working
Harishxx
(Windy)
April 27, 2021, 3:09pm
#8
Is there an error in the output?
Okay t h e n
What type of script is it (Local or Server), and where is it located?
Its a normal script in ServerScriptService
Are you getting any errors from the updated code?
Do you have anything else that is named Part in your Workspace?
No none at all completely 0
31 characters
Nope all i have is a part and a baseplate
I think the issue is either disabled script or incorrectly parented script if there are no errors. Otherwise it’s a logical error.
Really now? That’s strange
local hotdog = 1
print("Script firing")
while hotdog < 5 do
print("Loop running")
game.Workspace.Part.BrickColor = BrickColor.new("Really red")
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new("White")
wait(1)
game.Workspace.Part.BrickColor = BrickColor.new("Neon orange")
wait(1)
end
Try this and see if anything outputs?
it didnt print at all thats weird
Harishxx
(Windy)
April 27, 2021, 3:20pm
#18
Try checking the “Disabled” property of the script and make sure it’s false, also make sure “Archivable” is set to true.
eli6267
(MaybeEli)
April 27, 2021, 3:22pm
#19
Can you screen shot your script from studio?
Okay so i think i figured something else when i run the game the script turns into hello world its really weird