local Lighting = Instance.new("ColorCorrectionEffect", game.Lighting).Name = "Colors"
local tweenInfo = TweenInfo.new(12,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,true,1)
local Brightness = game.Lighting.Colors.Brightness
script.Parent.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
local Tween = TweenService:Create(Lighting,TweenInfo, {Brightness = 10})
Tween:Play()
end)
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)
Trying to make it so that the script creates a colorcorrectioneffect while the tool is held, and then when clicked it would adjust the brightness gradually. I keep getting Dictionary errors not sure whats going wrong.
An error is in this line here. You are assigning a property of a variable in the same line that you are trying to assign it to a property. Try seperating it into 2 lines and see if it helps
i.e.
local Lighting = Instance.new("ColorCorrectionEffect", game.Lighting)
Lighting.Name = "Colors"