Hi! I was making a Blur system with a value for the amount of blurs which popped up. I stumbled upon the error was:
“Insanity” was not found
My code:
local randomwait = math.random(300,800)
local Insanity = game.Players.LocalPlayer.PlayerScripts:WaitForChild("Insanity")
while true do
wait (randomwait)
if Insanity ~= 0 then
local size = 20
local blur = Instance.new("BlurEffect")
blur.Enabled = true
blur.Size = size
blur.Parent = workspace.CurrentCamera
game.Players.LocalPlayer.PlayerGui.Stage1.Enabled = true
wait(10)
blur:Destroy()
Insanity.Value = Insanity.Value +1
end
end
The output showed 1. But the blur stopped working at all.
local randomwait = math.random(300,800)
local Insanity = game.Players.LocalPlayer.PlayerScripts:WaitForChild("Insanity")
while true do
wait (1)
if Insanity.Value ~= 0 then
local size = 20
local blur = Instance.new("BlurEffect")
blur.Enabled = true
blur.Size = size
blur.Parent = workspace.CurrentCamera
game.Players.LocalPlayer.PlayerGui.Stage1.Enabled = true
wait(10)
blur:Destroy()
Insanity.Value = Insanity.Value +1
print(Insanity.Value)
end
end