Special effect rotation?

Hello, i am making some special effects for an attack for my game. I want to make the sfx rotate smoothly
while it is increasing in size, however everything ive tried up until now hanst worked.
Any help? Here is my script:

local sfxgoal = {
Scale = Vector3.new(8, 8, 8)
}

local sfxinfo = TweenInfo.new(
7,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out,
1,
false,
0.1
)

game.ReplicatedStorage.BigBangAttack.OnServerEvent:Connect(function(player, cframe)

local character = player.Character




local sfx = Instance.new("Part")
sfx.Parent = character.HumanoidRootPart
sfx.Position = character.HumanoidRootPart.Position
sfx.CanCollide =false
sfx.Size = Vector3.new(5.077, 5.232, 5.181)

local mesh = Instance.new("SpecialMesh")
mesh.Parent = sfx
mesh.MeshId = "rbxassetid://7675755781"


local weld = Instance.new("Weld")
weld.Parent = sfx
weld.Part0 = character.HumanoidRootPart
weld.Part1 = sfx

local tweenSfx = tweenservice:Create(mesh, sfxinfo, sfxgoal)

tweenSfx:play()

end

end)

1 Like

I think your problem is in the variable called sfxgoal, there you have the Scale but in lua it has to be called Size instead. Correct me if i am wrong.

The size part of the script is working. what i am asking is, how i would make the part called sfx rotate?

1 Like

With Orientation, you use vector3 again with it too

It should work by multiplying the parts current cframe by cframe.angles

local sfxgoal = {
Scale = Vector3.new(8, 8, 8)
CFrame = part.CFrame * CFrame.Angles(0,math.rad(x),0) --replace x with the degrees
}