I have this remote event that changes the lighting on a client’s screen. And I don’t know a way in which I could tween the Lighting based on how I have made the event.
--Client
game:GetService("ReplicatedStorage").Lighting.ChangeLightingOnClient.OnClientEvent:Connect(function(tabl)
for i,v in pairs(tabl) do
game:GetService("Lighting")[v["String"]] = v["Value"]
end
end)
Now to modify the client side. This is easy to do now because all we have to do is pass the table onto the tween service and it will do everything. Here:
--Client
game:GetService("ReplicatedStorage").Lighting.ChangeLightingOnClient.OnClientEvent:Connect(function(tabl)
local Lighting = game:GetService("Lighting")
local Infotween = TweenInfo.new(3)
game:GetService("TweenService"):Create(Lighting, Infotween, tabl):Play()
end)