Alright so.. I'm making a gun kit but for some silly reason, my welds aren't working right. Here's how it works. There is a part called AnimBase, the real right arm, the real left arm, a clone of the right arm, and a clone of the left arm, and the head of the character. I need to weld the AnimBase to the Head, the real left and right arms to the AnimBase, and the Fake Arms to the real arms. I've gotten that done no problem. The problem is.. When you test in server mode, the arms will fall off. I do not know why and I'm getting frustrated as crap. Please help:

repeat wait() until game.Players.LocalPlayer.Character
repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
wait(1 / 20)

local player = game.Players.LocalPlayer
local char = player.Character
local mouse = player:GetMouse()
local cam = game.Workspace.CurrentCamera
local tool = script.Parent

local LA = char:WaitForChild("Left Arm")
local RA = char:WaitForChild("Right Arm")
local LAW
local RAW

local AnimBase
local AnimBaseW

local FRA
local FLA
local FRW
local FLW

local arms


function MakeArmModel()
	arms = Instance.new("Model")
	arms.Parent = cam
	arms.Name = "Arms"
	
	local humanoid = Instance.new("Humanoid")
	humanoid.Parent = arms
end

function RemoveArmModel()
	arms:Destroy()
end

function MakeAnimBase()
	AnimBase = Instance.new("Part")
		AnimBase.Size = Vector3.new(0.2,0.2,0.2)
		AnimBase.Transparency = 1
		AnimBase.CanCollide = false
		AnimBase.Anchored = false
		AnimBase.Name = "AnimBase"
		AnimBase.Parent = cam
		
	AnimBaseW = Instance.new("Weld")
		AnimBaseW.Part0 = char:WaitForChild("Head")
		AnimBaseW.Part1 = AnimBase
		AnimBaseW.Parent = AnimBase
		--AnimBaseW.C0 = CFrame.new()
		--AnimBaseW.C1 = CFrame.new()
end

function RemoveAnimBase()
	AnimBase:Destroy()
end

--[[function WeldRealArms()
	RAW = Instance.new("Weld")
		--char:WaitForChild("Torso"):WaitForChild("Right Shoulder").Part1 = nil
		RAW.Part0 = AnimBase
		RAW.Part1 = RA
		RAW.Parent = RA
	
	LAW = Instance.new("Weld")
		--char:WaitForChild("Torso"):WaitForChild("Left Shoulder").Part1 = nil
		LAW.Part0 = AnimBase
		LAW.Part1 = LA
		LAW.Parent = LA
end]]--

function MakeFakeArms()
	FRA = RA:clone()
	FRA.Parent = arms
	
	FLA = LA:clone()
	FLA.Parent = arms
	
	FRW = Instance.new("Weld")
	FRW.Part0 = AnimBase
	FRW.Part1 = FRA
	FRW.Parent = FRA
	
	FLW = Instance.new("Weld")
	FLW.Part0 = AnimBase
	FLW.Part1 = FLA
	FLW.Parent = FLA
end

tool.Equipped:connect(function()
	MakeArmModel()
	MakeAnimBase()
	--WeldRealArms()
	MakeFakeArms()
end)

tool.Unequipped:connect(function()
	--char:WaitForChild("Torso"):WaitForChild("Right Shoulder").Part1 = RA
	--char:WaitForChild("Torso"):WaitForChild("Left Shoulder").Part1 = LA	
	RemoveArmModel()
	RemoveAnimBase()
end)

3 comments

0

Did you move the parts at all? In anyway?

0

The arms..

0

I can try and help you if you would invite me through team create this way I will know exactly what you are trying to do if you are afraid I might do something to your game then just get your script and then put it in a different game and publish that game...