I am trying to create a scripted animation of a person shooting a bullet. I want the bullet to move 50 studs away from the origin on the z axis. I am currently trying to use tweenService and Vector3, but when I run the code it says this:
TweenService:Create property named ‘Position’ cannot be tweened due to type mismatch (property is a ‘UDim2’, but given type is ‘Vector3’)
The code I am using is this:
local clone = game.Workspace.WorkMap.Bullets.Bullet:Clone()
clone.Transparency = 0
clone.Position = v.Gun.Position -- I am using this in a loop, so v is the thing that is shooting the bullet
clone.Parent = game.Workspace.WorkMap.Bullets
local bulletMove = TweenService:Create(game.Players.LocalPlayer.PlayerGui.FadeGui.Frame,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{Position = Vector3.new(clone.Position.X, clone.Position.Y, clone.Position.Z - 50)}):Play()
Is there a way to tween only one axis of an object’s position?