elseif Event == "Lighting" then
local oldTick = tick()
local ArgTable = (...)
local Value = ArgTable["Value"]
local lighting = game:GetService("Lighting")
local ts = game:GetService("TweenService")
local Duration = 2
if not lighting:FindFirstChild("MalevolentShrineLighting") and Value == true then
local Slashing = Instance.new("ColorCorrectionEffect",game.Lighting)
Slashing.Name = "MalevolentShrineLighting"
local Goal = {
Brightness = -0.3,
Contrast = 0.2,
TintColor = Color3.fromRGB(255, 181, 181)
}
local Info = TweenInfo.new(1,Enum.EasingStyle.Sine)
local Tween = ts:Create(Slashing,Info,Goal)
Tween:Play()
spawn(function()
while true do
task.wait()
if tick() - oldTick >= Duration then
print("It passed 2 seconds.")
end
end
end)
end
end```
The tick isn't reseting back to 0 every time the event is fired, instead it just keeps going up...
#Why isn't Tick() working properly..
10 messages · Page 1 of 1 (latest)
I’m sssing a problem here
Sensing