Hi I’m trying to make a SelectionBox SurfaceTransparency tween in and out to create a fading and reappearing effect.
I have been trying to use the tween service to fade the SurfaceTransparency smoothly but I can’t get it to work and it won’t output any errors or warnings.
I have tried looking at the SelectionBox refrence on the Developer Hub but I haven’t had any luck, some extra probably useless information is that the SurfaceTransparency value is a text box not a slider but I’m not sure if that makes a difference since I’m band new to roblox lua.
local tweenService = game:GetService("TweenService")
local box = script.Parent
local tweenInfo = TweenInfo.new(
1, --Time
Enum.EasingStyle.Linear, --EasingStyle
Enum.EasingDirection.Out, --EasingDirection
9999, --Repeat count
true, --Reverses if true
0.2 --Delay time
)
local tween = tweenService:Create(box, tweenInfo, {SurfaceTransparency=0})
tween:Play() print('run')