I’m making a no tool sword that automatically weld into your hand when you get in the game but only the handle showed and not the sword. I have tried many times but the sword refuse to be weld with the handle can anyone help me.
local function setUp(char)
local handle = fx.Handle:Clone()
handle.Parent = char
local m6d = Instance.new("Motor6D", handle)
m6d.Part0 = char["Right Arm"]
m6d.Part1 = handle
m6d.C1 = CFrame.new(0,1,0)
local model = fx.AlphaSword:Clone()
model.Parent = workspace.Fx
local weld = Instance.new("ManualWeld")
weld.Part0 = handle
weld.Part1 = model
weld.C1 = CFrame.new(0,2,-2.1) * CFrame.Angles(math.rad(90),0,0)
end
for i,v in pairs(game.Players:GetChildren()) do
repeat wait() until v.Character
setUp(v.Character)
v.CharacterAdded:Connect(function(char)
char:WaitForChild("Right Arm")
setUp(char)
end)
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char:WaitForChild("Right Arm")
setUp(char)
end)
end)
Here is my code
local handle = fx.Handle:Clone()
handle.Parent = char
local m6d = Instance.new("Motor6D", handle)
m6d.Part0 = char["Right Arm"]
m6d.Part1 = handle
m6d.C1 = CFrame.new(0,1,0)
This handle code does work
local model = fx.AlphaSword:Clone()
model.Parent = workspace.Fx
local weld = Instance.new("ManualWeld")
weld.Part0 = handle
weld.Part1 = model
weld.C1 = CFrame.new(0,2,-2.1) * CFrame.Angles(math.rad(90),0,0)
but this sword one isn’t
Any help will be appreciated, if you need more information just tell me.