I'm trying to increase the range of a PointLight
by tweening it, however I'm not sure how I should be creating the Tween. Is it TweenService:Create(PointLight, TweenInfo.new(5),{Range = 0})
or TweenService:Create(PointLight.Range, TweenInfo.new(5),{Number = 0})
, or something completely different?
Thanks in advance.
You could use a for loop to rapidly change a number
local start = 10 local goal = 70 local increment = 1 for i = start,goal,increment do print(i) wait(0.1) --This will print from 10 to 70 every 0.1 seconds end
You can use TweenService to tween a value Instance like normal (for variable...idk) and...... For example
local ts = game:GetService("TweenService") local goal = {} goal.Value = 0 -- Start Number goal.Value = 10 -- uuhh End ? local tweeninfo = TweenInfo.new(5) -- Seconds local twe = ts:Create(workspace.Value -- Value Instance ,tweeninfo,goal) -- CREATE wait(5) -- Let the script relax for 5 seconds twe:Play() -- P l a y
Yes, hope that helped