Here is my script:
while true do
local BrickColo = BrickColor.Random()
script.Parent.BrickColor = BrickColo
wait(1)
end
It worked perfectly but then after a few days it just started crashing my game!
Here is my script:
while true do
local BrickColo = BrickColor.Random()
script.Parent.BrickColor = BrickColo
wait(1)
end
It worked perfectly but then after a few days it just started crashing my game!
Hold on... This script seems to be causing this. When I disable the script up there it still crashes and it blames it on another script... But when I disable this script:
while script.Parent.Value.Value == 1 do
if script.Parent.ValueA.Value < 5 then
wait(2)
local ne = script.Parent.ClonePaer:Clone()
ne.Parent = script.Parent.Modela
ne.Anchored = false
ne.Position = script.Parent.Position
script.Parent.ValueA.Value = script.Parent.ValueA.Value + 1
end
end
It all works perfectly.
But I still need answers
I found the problem. I forgot some wait.
Modela? may be problem
while wait(1) do
script.Parent.BrickColor = BrickColor:Random()
end
:)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Are you sure this is the source of the error and not some other script you implemented?
Yes. It points an arrow to line 2 when I click break script.
do while wait(0.1) do and it wont crash at all!