Help with animating properties

Hope I’m not being too annoying with how much I’m on here…

I’m making a “power surge” function in my game. When a certain value is reached, all the lights will rise in brightness and volume before a blackout. How would I tween (or use any other method) things such as the brightness property of a light or audio?
Very new to scripting, there are lots of commands I don’t even know exist. Could whoever answers please explain in more detailed steps how to work this out for future reference? Thanks a lot.

Use TweenService.
https://developer.roblox.com/en-us/api-reference/class/TweenService
It can tween pretty much anything apart from bool values.
I seem to remember using it for Volume so idk if the service got updated because it says on the page that it cant tween numbers

Let me study up on TweenService, I’ll see if it works.
Thanks!

New problem. I’ve worked out a tween for changing the brightness of the light. It doesn’t work whatsoever. Is there something wrong with this coding or is “Brightness” not even a property to be tweened?

local surge = game.Workspace:WaitForChild("Values"):WaitForChild("SURGE")
local light = script.Parent
local buzz = script.Parent.Parent.Buzz

if surge.Value >= 1000 then
	local TweenService = game:GetService("TweenService")
	local info = TweenInfo.new(
		9,
		Enum.EasingStyle.Sine,
		Enum.EasingDirection.Out,
		0,
		false,
		0
	)
	
	local goals =
	{
		Brightness = 4;
	}
	
	local LightBloom = TweenService:Create(light, info, goals)
	
	LightBloom:Play()
end

You may want to add a call to print inside the if statement’s body as the following condition may not be satisfied.

if surge.Value >= 1000 then

First , why are you making a TweenService vatiable inside the if statement and not on top?( where all variables/services are).

Second, try to print out some stuff to see what happens/ whats wrong.

Nothing I try to print in this script (inside if-then) ends up in output. But there is no error message correlating with anything either.

Are you using a local script for this?

No, this is a regular script. Shouldn’t it be like that so everyone experiences the event?

I thought you were using a local script because nothing was printing in the output.
It might be that the if statement isn’t even running, because the value is not high enough.

Finally realized the problem with everything. It’s the if then command itself! The tween works fine without it, but how am I supposed to only have it activate by IntValue?

GOT IT!
I was supposed to use surge.Changed:Connect(function() before introducing the if then command. Now everything works dandy! Way to go, me.