Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Script editing the Size of a Blur in the Lighting does not work?

This script is pretty simple and I don't see any inherent issues with it, so I imagine theres some rule of Roblox Studio i'm missing here? This is a server script in the workspace attempting to edit the size of a Blur Effect in the Lighting.

local blur = game.Lighting.Blur.Size
while true do
	wait(3)
	blur = 2
	wait(0.1)
	blur = 4
	wait(0.1)
	blur = 6
	wait(0.1)
	blur = 8
	wait(0.1)
	blur = 10
	wait(0.1)
	blur = 12
	wait(0.1)
	blur = 14
	wait(0.1)
	blur = 16
	wait(0.1)
	blur = 18
	wait(0.1)
	blur = 20
	wait(0.1)
	blur = 22
	wait(0.1)
	blur = 24
	wait(0.1)
	blur = 22
	wait(0.1)
	blur = 20
	wait(0.1)
	blur = 18
	wait(0.1)
	blur = 16
	wait(0.1)
	blur = 14
	wait(0.1)
	blur = 12
	wait(0.1)
	blur = 10
	wait(0.1)
	blur =8
	wait(0.1)
	blur = 6
	wait(0.1)
	blur = 4
	wait(0.1)
	blur = 1
	wait(0.1)
end

It does not work at all.

1 answer

✓ Accepted answer

Hello, You have to define the Blur, not it's property Size. I recommend you to use TweenService to do that.

Here's an example:

local Blur = game.Lighting:WaitForChild("Blur")
local TweenService = game:GetService("TweenService")
local TweenInformation = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)

while true do
	TweenService:Create(Blur, TweenInformation, {Size = 30}):Play()
	wait(2)
	TweenService:Create(Blur, TweenInformation, {Size = 1}):Play()
	wait(2)
end

Please read this: https://developer.roblox.com/api-reference/class/TweenService

There you will find everything about TweenService, including its syntax.

1 comment

0

Thanks, my scripting skills are outdated so I guess I have some research to do.

This discussion is preserved as it was. New answers, comments, and votes are closed.