Yes, you should. Normal welds are easier to modify via scripts, plus, there is virtually no actual difference between performance and results.
Alright, I will try that. Will comment if something isn’t working. Thanks!
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("Weld")
weld.Part0 = RightArm
weld.Part1 = fakeRightArm
weld.C0 = RightArm.CFrame:Inverse()
weld.C1 = fakeRightArm.CFrame:Inverse()
weld.Parent = character
weld.Name = "FakeArmWeld"
tweenService:Create(fakeRightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {Size = fakeRightArm.Size + Vector3.new(0, 50, 0)}):Play()
tweenService:Create(weld, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {C1 = CFrame.new(0, 50/2, 0)}):Play()
Like this? It doesn’t work.
FInd both the Position and Size, and use those.
Why are you tweening C1? I told you to tween C0. Plus, I think you should remove the fakeRightArm.Size statement in the first tween.
But isn’t C0 the RightArm and not the fakeRightArm?
It isn’t, that’s not how it works. You need to use C0.
So like this?
tweenService:Create(fakeRightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {Size = fakeRightArm.Size + Vector3.new(0, 50, 0)}):Play()
tweenService:Create(weld, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {C0 = CFrame.new(0, 50/2, 0)}):Play()
This still doesn’t work
Can you elaborate on that? What exactly doesn’t work?
Here a video about the behaviour:
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("Weld")
weld.Part0 = RightArm
weld.Part1 = fakeRightArm
weld.C0 = RightArm.CFrame:Inverse()
weld.C1 = fakeRightArm.CFrame:Inverse()
weld.Parent = character
weld.Name = "FakeArmWeld"
tweenService:Create(fakeRightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {Size = fakeRightArm.Size + Vector3.new(0, 50, 0)}):Play()
tweenService:Create(weld, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {C0 = CFrame.new(0, 50/2, 0)}):Play()
...
I would do this by dividing the position by half the size on your axis, and tweening the position at the same time. We know that size changes on both directions, so that is something we should account for.
local properties = {
Size = fakeRightArm + Vector3.new(0, 50, 0),
Position = fakeRightArm + Vector3.new(0,25,0),
}
local ArmTween = tweenService:Create(fakeRightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), properties)
ArmTween:Play()
Script used:
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"
local properties = {
Size = fakeRightArm.Size + Vector3.new(0, 50, 0),
Position = fakeRightArm.Position + Vector3.new(0,25,0),
}
tweenService:Create(fakeRightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), properties):Play()
The arm flies in the air for some reason.
Can you provide a vid? I feel it has something to do with your welds or the properties set above it? hmm.
Your solution won’t work. He has a joint, so the arm can’t move freely, and if it tries to, it breaks the joint.
I’ve also 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 the CFrame seems to not affect it at all, it’s just like in the first vid, it tweens in both directions.
Hi! No, that’s not needed.
For example you can do
local part = workspace.Part
part:Destroy()
but you can also do
workspace.Part:Destroy()
It doesn’t really matter. The tween is working, it’s just that it tweens on both directions.
I’ve tried that though and no, it doesn’t work, unfortunately it tweens on both directions aswell.
It has to do something with the weld, probably.
It should stretch out to the front.
Thanks but that doesn’t work.
Here is my script:
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)}):Play()
tweenService:Create(RightArm, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {Position = RightArm.Position + Vector3.new(0,0,-25)})
RightArm is the partA, as it’s the part0. I tried changing it’s position but it didn’t work, it’s just like in the first video, it gets tweened on both sides.
Alright, here’s how I went about doing this:
I tried using the same WeldConstraint and proposed a solution that worked, however it was a bit glitchy because of the high speed due to the short time. I came up with another solution that was more complicated and didn’t require any constraints and went fine, even with the high speed
Basically, I bind a function to update right after the character updates using BindToRenderStep
and went about tweening in a different way. The Size and CFrame are updated in the function:
local tweenInitiated = false
local isTweening = false
local TIME = 0.3
RunService:BindToRenderStep("FakeArmUpdate", Enum.RenderPriority.Character.Value + 1, function()
if tweenInitiated then
tweenInitiated = false
isTweening = true
t = os.clock() -- starting time
end
if isTweening then
local elapsed_time = math.min(1, (os.clock() - t) / TIME) -- getting the elapsed time as a number between 0 and 1
local alpha = game:GetService("TweenService"):GetValue(elapsed_time, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) -- gets the y-component of the ordered pair in the easing function's graph when x = elapsed_time
fakeRightArm.Size = originalSize + Vector3.new(0, 50, 0) * alpha -- applying tweening to the size
if elapsed_time == 1 then
isTweening = false -- stop the tween if the elapsed time has passed
end
end
fakeRightArm.CFrame = RightArm.CFrame * CFrame.new(0, -fakeRightArm.Size.Y / 2 + RightArm.Size.Y / 2, 0)
end)
-- Whenever you desire to extend the arm:
if not tweenInitiated and not isTweening then
tweenInitiated = true
end
Also tried tweening the size with TweenService:Create
with the function binded to renderstep updating its cframe – same result as what happened before: it glitches