-
What do you want to achieve? Keep it simple and clear!
I wanna achieve my script works, but i start lagging at one moment and then get that error -
What is the issue? Include screenshots / videos if possible!
i alr wrote issue in title lol -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I didn’t find anything.
Here is code
local MoneyLevel = script.Parent.Parent.Parent.MoneyLevel
local SpeedLevel = script.Parent.Parent.Parent.SpeedLevel
local MainPart = script.Parent.Parent.MainPart
local FactoryBrokenValue = script.Parent.Parent.FactoryBroken
local DB = true
while DB == true do
while MoneyLevel.Value == 0 do
while SpeedLevel.Value == 0 do
while FactoryBrokenValue.Value == false do
wait(0.8)
script.Parent.Position = Vector3.new(42.434, 10.85, -335.235)
local PlrBricks = script.Parent.Parent.Parent.PlayerBricks
PlrBricks.Value = PlrBricks.Value + 1
script.Parent.Anchored = true
script.Parent.Transparency = 1
wait(3)
script.Parent.Anchored = false
script.Parent.Transparency = 0
end
end
end
while SpeedLevel.Value == 1 do
while MoneyLevel.Value == 0 do
while FactoryBrokenValue.Value == false do
wait(0.8)
script.Parent.Position = Vector3.new(42.434, 10.85, -335.235)
local PlrBricks = script.Parent.Parent.Parent.PlayerBricks
PlrBricks.Value = PlrBricks.Value + 1
script.Parent.Anchored = true
script.Parent.Transparency = 1
wait(2)
script.Parent.Anchored = false
script.Parent.Transparency = 0
end
end
end
while SpeedLevel.Value == 1 do
while MoneyLevel.Value == 1 do
while FactoryBrokenValue.Value == false do
wait(0.8)
script.Parent.Position = Vector3.new(42.434, 10.85, -335.235)
local PlrBricks = script.Parent.Parent.Parent.PlayerBricks
PlrBricks.Value = PlrBricks.Value + 2
script.Parent.Anchored = true
script.Parent.Transparency = 1
wait(2)
script.Parent.Anchored = false
script.Parent.Transparency = 0
end
end
end
end