Hello, I’m trying to make a spin effect on these 2 meshes as seen in the gyazo. https://gyazo.com/1407db7205d7836fad57363d418fce5e
I know I’m supposed to edit the X axis but everytime I do that, it doesn’t have the same effect and just rotates weirdly in some direction. I tried rotating it constantly with cframe.Angles() and bodyangularforce and a angularforce
script.Cannon.OnServerEvent:Connect(function(plr)
punch = {}
char = plr.Character
local shockwave1 = game.ReplicatedStorage.TOOLS.PunchCannonEffect.Shockwave1:Clone()
local shockwave2 = game.ReplicatedStorage.TOOLS.PunchCannonEffect.Shockwave2:Clone()
shockwave1.CFrame = char.Torso.CFrame * CFrame.new(0,2,-8)
shockwave2.CFrame = char.Torso.CFrame * CFrame.new(0,2,-7)
shockwave1.CFrame = shockwave1.CFrame * CFrame.Angles(1.5,0,0)
shockwave2.CFrame = shockwave2.CFrame * CFrame.Angles(1.5,0,0)
shockwave1.Parent = game.Workspace
shockwave2.Parent = game.Workspace
table.insert(punch,shockwave1)
table.insert(punch,shockwave2)
for i,v in pairs(punch) do
local angluar = Instance.new("AngularVelocity")
angluar.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
angluar.AngularVelocity = Vector3.new(0,0,-2)
angluar.Parent = v
local bodyvelocity = Instance.new("BodyVelocity")
bodyvelocity.Velocity = plr.Character.Torso.CFrame.lookVector * 70 ---body velocity direction
bodyvelocity.Parent = v
bodyvelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
end
wait(.5)
for i = 1,20 do wait(.07)
shockwave1.Transparency = shockwave1.Transparency + 0.06
shockwave2.Transparency = shockwave2.Transparency + 0.04
end
end)
for i,v in pairs(punch) do
local angluar = Instance.new("BodyAngularVelocity")
angluar.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
angluar.AngularVelocity = Vector3.new(200,0,0)
angluar.Parent = v
local bodyvelocity = Instance.new("BodyVelocity")
bodyvelocity.Velocity = plr.Character.Torso.CFrame.lookVector * 70 ---body velocity direction
bodyvelocity.Parent = v
bodyvelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
end
I should’ve noticed this earlier, but you should’ve used the y-axis (yaw axis). I just saw in the original gif that the axis was green which was the y-axis. So you basically have to use the y-axis.
If I can’t seem to get the correct axis, I usually try to rotate on each axis to get the intended rotation