What do you want to achieve? Keep it simple and clear!
I need to make a beam attack for a item in my game, mostly using vfx for the explosion and beam. The beam is supposed to spawn at it’s thickest, and smoothly scale down till it’s at 0 thickness.
What is the issue? Include screenshots / videos if possible!
I have no idea how to make a beam tween, which I need it to be like the beams from Unbound in sols rng.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried to tween it, didn’t work, and I have no idea.
You can use the TweenService to tween the width of the beam over time.
local TweenService = game:GetService("TweenService")
-- Assuming you have a beam object named "beam" in your game
local beam = game.Workspace.Beam
-- Set the initial width of the beam
beam.Width0 = 5
beam.Width1 = 5
-- Define the target width of the beam (0 in this case)
local targetWidth = 0
-- Define the duration of the tween in seconds
local tweenDuration = 2
-- Create a TweenInfo object with the desired duration and easing style
local tweenInfo = TweenInfo.new(tweenDuration, Enum.EasingStyle.Linear)
-- Create a tween that animates the width of the beam from its initial width to the target width
local tween = TweenService:Create(beam, tweenInfo, { Width0 = targetWidth, Width1 = targetWidth })
-- Play the tween
tween:Play()
Make sure to replace game.Workspace.Beam with the actual path to your beam object in the game.