0

I tried doing

local fakeRightArm = Instance.new("Part")
fakeRightArm.BottomSurface = Enum.SurfaceType.Smooth
fakeRightArm.CanCollide = false
fakeRightArm.Massless = true
fakeRightArm.Material = Enum.Material.Plastic
fakeRightArm.BrickColor = RightArm.BrickColor
fakeRightArm.Size = RightArm.Size
fakeRightArm.CFrame = RightArm.CFrame
fakeRightArm.Parent = character 
fakeRightArm.Name = "fakeRightArm"
local weld = Instance.new("WeldConstraint")
weld.Part0 = RightArm
weld.Part1 = fakeRightArm
weld.Parent = character
weld.Name = "FakeArmWeld"


tweenService:Create(fakeRightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {Size = fakeRightArm.Size + Vector3.new(0, 50, 0), CFrame = fakeRightArm.CFrame * CFrame.new(0,0,-50)}):Play()

but that seems to not work. It's probably because of the weld.

I want it so it tweens the arm forward.

DevForum post (maybe more detailed): https://devforum.roblox.com/t/how-to-only-tween-in-one-direction/841408/42

Thank you!

Geiler
  • 3
  • 2
  • 1
    "tween" is just a shortened word for "in-between" you'll need two positions, such as arm up, and arm down. then you use the tween function to generate a new position, somewhere "in-between" those two extremes. – Doyousketch2 Oct 29 '20 at 13:31

1 Answers1

0

don't think you need the tween function just to position it
https://developer.roblox.com/en-us/api-reference/datatype/CFrame
start with the right arm position, then rotate its coordinate frame.

local fakeRightArm = Instance.new("Part")

fakeRightArm.BottomSurface = Enum.SurfaceType.Smooth
fakeRightArm.CanCollide = false
fakeRightArm.Massless = true
fakeRightArm.Material = Enum.Material.Plastic
fakeRightArm.BrickColor = RightArm.BrickColor
fakeRightArm.Size = RightArm.Size
fakeRightArm.Parent = character
fakeRightArm.Anchored = true
fakeRightArm.Name = "fakeRightArm"

--  you pick which angle to make it face
local Xdir = math.rad( 0 )  --  twist palm up, palm down
local Ydir = math.rad( 90 )  --  lift up / down
local Zdir = math.rad( 15 )  --  swing left / right

fakeRightArm.CFrame = RightArm.Position *CFrame.Angles( Xdir, Ydir, Zdir )
Doyousketch2
  • 2,060
  • 1
  • 11
  • 11