Tween Game.Lighting not working

Hello! I’m trying to tween the Blur and the Saturation in the lighting of my game, but for some reason it doesn’t work, and there’s no errors in the output.
Here’s the script:

local blur = script.Parent
local color = script.Parent.Parent.ColorCorrection

local re1 = script.Parent.On
re1.OnServerEvent:Connect(function()
	TweenService:Create(
		blur, 
		TweenInfo.new(1), 
		{Size = 30}
	):Play()
	TweenService:Create(
		color, 
		TweenInfo.new(1), 
		{Saturation = -1}
	):Play()
end)

It appears the issue could be either that TweenService is not defined however I assume you defined it elsewhere or the more likely is just that this is organized very strangely… Put the RE in ReplicatedStorage and the script in ServerScriptService and it should work fine.

local TweenService = game:GetService("TweenService")
local blur = game.Lighting:WaitForChild("Blur")
local color = game.Lighting:WaitForChild("ColorCorrection")
local re1 = game.ReplicatedStorage:WaitForChild("On")

re1.OnServerEvent:Connect(function()
	TweenService:Create(
		blur, 
		TweenInfo.new(1), 
		{Size = 30}
	):Play()
	TweenService:Create(
		color, 
		TweenInfo.new(1), 
		{Saturation = -1}
	):Play()
end)

No… It still doesn’t work for some reason.

Just tested following code in studio, it works fine. Seems like problem is that remote event isnt getting fired.

1 Like

As the other guy said it works fine in studio for me… are you not firing the remote?

I’m going to check if that’s the problem. Also, I’m firing the re from a LocalScript in the PlayerGui, is that possible?

Yes, at least I think that I am. Using the following script:
game:GetService("ReplicatedStorage").On:FireServer()
The LocalScript that should fire the RE is located in the PlayerGui

First of all make sure that your local script is descendant of player or character. And yes, seems like these changes apply to everyone on server, are you sure want it to work like that?