-
What do you want to achieve?
I want to make my 4 mesh parts spin around. -
What is the issue?
For some reason only two mesh parts are changing orientation in loop
while two others called StraightShockwave and CoolVFX doesn’t do that:
https://gyazo.com/bd42cb1ab4e57b83a258b8d6799b9dcf -
What solutions have you tried so far?
I tried to spin those two mesh parts on all axis. I checked
if it changes orientation by any value by clicking on it fast
in game testing and also i print debug after each elseif statement.
function TxSmash:Spin(obj,Duration)
local cor = self.cor
cor:Wrap(function()
for i = 1,Duration do
if obj.Name == "swaround" then
wait()
obj.CFrame = obj.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(i+5),math.rad(0),math.rad(0))
elseif obj.Name == "PlayerShockwave" then
wait()
obj.CFrame = obj.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(i+5),math.rad(0))
elseif obj.Name == "ShockwaveStraight" then
print("Blah")
wait()
obj.CFrame = obj.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(i+5),math.rad(0),math.rad(0))
elseif obj.Name == "CoolVFX" then
wait()
obj.CFrame = obj.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(i+5),math.rad(0),math.rad(0))
end
end
end)
end
No errors. Prints DebugCode 40 times just like it should after elseif statements.