Can't Remove Clone Problem

Ok so for my game im trying to stretch a arm out, (if you can explain why it just gets bigger too)
but whenever I activate the tween the problem that I get is that the object disappears after usage as intended (if im not trying to remove it, I get an error for removing) but when I reuse it stays the same size as before like when I use the clone again its the same clone cuz I can’t remove that clone

script:

local GumGumPistol = game:GetService("ReplicatedStorage"):WaitForChild("RubberFruit_Events").GumPistol
local RS = game:GetService("ReplicatedStorage")
local GumGumPistol = game:GetService("ReplicatedStorage"):WaitForChild("RubberFruit_Events").GumPistol
local RS = game:GetService("ReplicatedStorage")
local GumPunch = Instance.new("Animation")
local GumGumPistol = game:GetService("ReplicatedStorage"):WaitForChild("RubberFruit_Events").GumPistol
GumPunch.AnimationId = "http://www.roblox.com/Asset?ID=13495201168" --AnimId
local VFX = game:GetService("ReplicatedStorage").RubberFruit_VFX
 Vclone = VFX.Punch:Clone()
 VStretchArm = VFX.StretchArm:Clone()
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(
	4, --Length seconds
	Enum.EasingStyle.Linear, --Animate Style
	Enum.EasingDirection.Out, --Direction
	0, --Repeat times 0 is 1 time
	true, --Go back to normal true is better
	0 --Delay
)

local Goals = {Size = Vector3.new(10, 10, 10)}

local Tween = TweenService:Create(VStretchArm, Info, Goals)

local function TrashTween()
	VStretchArm:Destroy()
end
GumGumPistol.OnServerEvent:Connect(function(player, PistolTrigger)
	print("RecievedEvent")
	print("BeginningStretch")
	wait(0.1)

end)
GumGumPistol.OnServerEvent:Connect(function(player)
	GumPunch.Parent = player.Character
	local animTrack = player.Character.Humanoid:WaitForChild("Animator"):LoadAnimation(GumPunch)
	animTrack:Play()
	Vclone.Parent = player.Character.RightHand
	Vclone.Enabled = true
	VStretchArm.Parent = player.Character
	VStretchArm.Position = player.Character.RightHand.Position
	VStretchArm.WeldConstraint.Part0 = player.Character.RightHand
	VStretchArm.WeldConstraint.Part1 = VStretchArm
	wait(.1)
	Tween:Play()
	Vclone.Parent = game.ReplicatedStorage.ParticleDebris
	wait(.05)
    VStretchArm.Parent = game.ReplicatedStorage.ParticleDebris
TrashTween() --this gives me a error cuz the parent becomes null cuz it tries to reuse the same clone and since the clone is now destroyed it like cant do that and breaks
end)

:Post deleted by author: bruhβ€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž

the weld is breaking when u tweened the size. try and update the cframe on hearbeat while its there

Don’t understand a thing there, can you give me an example?

Try to add local like this:

local Vclone = VFX.Punch:Clone()
 local VStretchArm = VFX.StretchArm:Clone()

Characters are models, parts welded by Motor6D’s. If you grab a Body Part of the Character Model and just change its size or its position you will be breaking the Motor6D which is what is welding that Body Part to the Character.

Its kinda hard to manipulate the character parts without breaking the Motors.

As far as I understand you want to make the Character to stretch its arm by Tweening the Size of the part, and that could possibly breaking the Motor.

I suggest you perform some tests on a character, changing its motors properties, trying to resize a part and you will understand what I mean. So you can choose a better approach on resizing its parts

Oh dont worry its stretching a seperate arm part, so whats causing the actual error?

1 Like

didn’t do anythingβ€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž

Got it, thats a good approach, creating a new part to work as the scalable arm. Then, on the Tween you used to resize it, make sure you are offsetting its CFrame too, if you scale it 5 studs, be sure you are reposition its CFrame 2.5 studs too, on the axis you are reScaling it

but did you read what this is even for?? the error causing it to not work, whats going on with that??

error is described very well in the top but heres the error itself
The Parent property of StretchArm is locked, current parent: NULL, new parent countdrums
its from deleting the clone of stretch arm after its used, problem is, cant do that cuz the clone gets reused

1 Like

I did read it, I just dont have time to focus on it, Im just giving some suggestions on the system you are building. Sorry, cheez… chill… good luck, its an easy system to achieve, I hope you find the proper way soon

bruh ._. ok I just wanted to know whats going on with the error sorry just wanted to know

1 Like