Issue with Tween

  1. What do you want to achieve? I want to create something like this:
Kamehameha Example

image

I want to create a STRAIGHT beam, that goes 1 way: Forward.

  1. What is the issue? When I use TweenService to make the beam go forward, it goes both forward AND backward.

  2. What solutions have you tried so far? I’ve watched several Kamehameha tutorials, searched up TweenService, CFrame, Vector3, etc. But I can’t find the issue.

local tween = game:GetService("TweenService")
local B = game.Workspace.Ball

local T = TweenInfo.new(
	1.5,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	2
)

local G = {}

G.Size = Vector3.new(100,0,0)


local F = tween:Create(B,T,G)
F:Play()

Dont mind the names, I wanted to keep it short.

You have to tween position as well as size. Size is just gong to keep it in the same position and make it get bigger in all directions.

1 Like

Thank you!
One question: What is tween position?
And how would I get this?

Just an extra property to add to your G table.

Alright, thanks!
Can you show me this in a script, by chance?
Like, what would I do? Would I just say, G.TweenPosition =

It would be G.Position Since you want to change the Position option of what you are tweening.

Alright, thank you! Thanks for spending this time to help me understand this, and I hope you have a great rest of your day/night! :smiley:

Depending on how advance you were I think the best way to find the position would to be using CFrame’s LookVectors so you can relate the position of the beam relative to the player’s position.

Er, what’s look vector? Sorry i’m new to programming :confused:

If you are new to scripting I wouldn’t bother trying to use it right now. But if you want to look into it in the future you can explore CFrame.