Here is the model
Tbh I don’t know, I’ve never done FPS stuff.
The period got removed when i was trying to format the post the period is there in the script though so thats not it.
Btw variable for the gunmodel is this
local gunmodel = game.ReplicatedStorage:WaitForChild("MiniGun")
Models don’t have a CFrame property either.
Use gunmodel.Barrel for the tween creation.
If you want to tween an entire model I recommend taking a look at the following thread.
Ok that fixed the error but it still wont turn…
Now try 90 degrees, 4 times.
This text will be blurred
How would i make it turn 4 times?
also its already looping on 90 degrees on the X axis so it should work but it doesnt turn?
Could you send your current code?
CFrame.Angles(360,0,0)
Unless this is outdated.
local barreltweeninfo = TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,-1)
local barreltween = ts:Create(gunmodel.Barrel,barreltweeninfo,{CFrame = gunmodel.Barrel.CFrame *CFrame.Angles(90,0,0)})
barreltween:Play()
Wrap the last two lines in this:
for 1 = 1,4,1 do
end
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?
New error
Players.spydercam500.PlayerScripts.GunSystemLocalHandler:40: Expected identifier when parsing
variable name, got '1'
What’s the error?
This text will be blurred
This is the barrel
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
@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.