Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This script is crashing my game and I don't know why. Anybody help?

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!

3 comments

0

Are you sure this is the source of the error and not some other script you implemented?

0

Yes. It points an arrow to line 2 when I click break script.

0

do while wait(0.1) do and it wont crash at all!

2 answers

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.

3 comments

0

But I still need answers

0

I found the problem. I forgot some wait.

0

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.