Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My Fake Arm Script Doesn't Seem to Go Properly :/ Help?

plr = game.Players.LocalPlayer
char = plr.Character
Tool = script.Parent
On = false

Tool.Equipped:connect(function()
if not On then
On = true
if On then
FLArm = Instance.new('Part')
FLArm.BrickColor = char['Left Arm'].BrickColor
FLArm.Name = 'Left Arm'
FLArm.Position = char['Left Arm'].Position
FLArm.CanCollide = false
FLArm.Locked = true
FLArm.FormFactor = 'Symmetric'
FLArm.Shape = 'Block'
FLArm.Size = char['Left Arm'].Size
Mesh0 = Tool.Arm:clone()
Mesh0.Parent = FLArm

FRArm = Instance.new('Part')
FRArm.BrickColor = char['Right Arm'].BrickColor
FRArm.Name = 'Right Arm'
FRArm.Position = char['Right Arm'].Position
FRArm.CanCollide = false
FRArm.Locked = true
FRArm.FormFactor = 'Symmetric'
FRArm.Shape = 'Block'
FRArm.Size = char['Right Arm'].Size
Mesh1 = Tool.Arm:clone()
Mesh1.Parent = FRArm
end
end
end)

Tool.Unequipped:connect(function()
On = false
end)

this is my last attempt... earlier I tried cloning the char's Arms... Problem is that it doesn't make any Parts... but it should make 2 Parts Left Arm and Right Arm... nothing orks...

2 answers

You're not setting the parts parents, and cloning is a much better option. Try something like this:

Plr = game:GetService("Players").LocalPlayer
Char = Plr.Character
Tool = script.Parent
On = false
OrigRA = Char:findFirstChild("Right Arm")
OrigLA = Char:findFirstChild("Left Arm")
RS = Char.Torso:findFirstChild("Right Shoulder")
LS = Char.Torso:findFirstChild("Left Shoulder")
OrigRA.Archivable = true
OrigLA.Archivable = true

Tool.Equipped:connect(function()
	if not On and OrigRA and OrigLA and RS and LS then
		On = true
		local ArmHold = Workspace:findFirstChild("ArmHolder") or Instance.new("Model", Workspace).Name = "ArmHolder"
		local NewRA = OrigRA:Clone()
		local NewLA = OrigLA:Clone()
		NewRA.Parent = ArmHold
		NewLA.Parent = ArmHold
		RS.Part1 = NewRA
		LS.Part1 = NewLA
		OrigRA.Parent = nil
		OrigLA.Parent = nil
	end
end)

Tool.Unequipped:connect(function()
	On = false
	pcall(function() NewRA:Destroy() end)
	pcall(function() NewLA:Destroy() end)
	pcall(function() OrigRA.Parent = Char end)
	pcall(function() OrigLA.Parent = Char end)
end)
Tool = script.Parent

Tool.Equipped:connect(function()
	wait()	
	character = script.Parent.Parent
	realLeft = character:FindFirstChild("Left Arm")
	FLArm = realLeft:clone()
	FLArm.Parent = Tool
	FLArm.BrickColor = realLeft.BrickColor
	FLArm.Name = "Left Arm"
	FLArm.CanCollide = false
	FLArm.Anchored = false
	FLArm.Locked = false
	FLArm.FormFactor = "Symmetric"
	FLArm.Shape = "Block"
	FLArm.Size = Vector3.new(1, 2, 1)
	mesh = Tool.Arm:clone()
	mesh.Parent = FLArm

	realRight = character:FindFirstChild("Right Arm")
	FRArm = realRight:clone()
	FRArm.Parent = Tool
	FRArm.BrickColor = realRight.BrickColor
	FRArm.Name = "Right Arm"
	FRArm.CanCollide = false
	FRArm.Anchored = false
	FRArm.Locked = false
	FRArm.FormFactor = "Symmetric"
	FRArm.Shape = "Block"
	FRArm.Size = Vector3.new(1, 2, 1)
	mesh = Tool.Arm:clone()
	mesh.Parent = FRArm
	
	d0 = Instance.new('Weld')
	d0.Parent = realLeft
	d0.Part0 = realLeft
	d0.Part1 = FLArm
	
	d1 = Instance.new('Weld')
	d1.Parent = realRight
	d1.Part0 = realRight
	d1.Part1 = FRArm
end)

my other Script guys, sometimes my Arms face don instead of at the Mouse... and if I try use CFraming or Vector3 for changing the Rotation, I kinda get stuck in the Baseplate, and jump out automatically, but if I change both Arms Rotations, then I get definetly stuck in the Baseplate...

1 comment

0

Did you not get my answer from earlier?

This discussion is preserved as it was. New answers, comments, and votes are closed.