Why wont this tween work?

What shape is the barrel? If it’s a cylinder then a 90 rotation along the X axis might not change anything, have you tried manipulating the rotation along the Z axis instead?

1 Like

New error

Players.spydercam500.PlayerScripts.GunSystemLocalHandler:40: Expected identifier when parsing 
variable name, got '1'

What’s the error?

This text will be blurred

1 Like

This is the barrel
image

Oh, then any change should be noticeable, thank you for sharing.

Sorry i messed up. Change the loop to this.

for i =1,4,1 do

end
1 Like

@Forummer
@JamminRedPandaMan
I just remembered something that could be useful

Basically when you load into the game the whole gun welds to the Handle of the gun the welds are Motor6D’s i think this is why its not turning but how will i make the barrel turn if there welded to the Handle?
I cant just not have it welded otherwise it will just fall off onto the ground.

Maybe try welding using weld constraints instead of Moder6Ds? (Unless you need the Modor6Ds for animations or something.) That still might now work though I’m not sure.

1 Like

Ill try to but i think i need them for the animations…

In that case I’ll have to do some thinking. I got to go now though but I’ll get back to you.

1 Like

It appears it works ish when i tested it although it breaks the Framework and make the WHOLE model spin aswell hmmm.

I’m guessing gunmodel is a Model,

Model’s don’t have a CFrame property and can’t be tweened because roblox hates models.

Refer to this post for info on how to tween models

1 Like

The minigun is the gunmodel the barrel is what im trying to spin.

Oh you put the create on the gunmodel

Fixed line

local barreltween = ts:Create(gunmodel.Barrel,barreltweeninfo,{CFrame = gunmodel.Barrel.CFrame * CFrame.Angles(360,0,0)})
1 Like

This text will be blurred

I fixed it! I just had to use moon animator to animate it spinning.

1 Like