I've been trying to have something like this for a while for a project I've been working on. However, I don't seem to have any luck. What I need is a part that spawns a random weapon out of an assigned weapon pool. I currently have one that does exactly that, but weapons made out of more parts only spawn the handle, and they're definitely unusable in that state.
wait(1)
local weps = game.Lighting.Weapons:children()
local wep = script.Parent:findFirstChild("Weapon")
local chosen = nil
while true do
chosen = weps[math.random(1, #weps)]
chosen.Parent = wep
chosen.Handle.Position = script.Parent.Spawn.Position
repeat
wait()
until chosen.Parent ~= wep or chosen:findFirstChild("Handle") == nil
if chosen:findFirstChild("Handle") == nil then
chosen:remove()
end
print("Tool was taken")
print("Fetching new weapon...")
wait(10)
if wep == nil then
local model = Instance.new("Model")
model.Parent = script.Parent
model.Name = "Weapon"
local wep = model
end
end
This is the code I use. The script finds the weapons from a model.

2 comments
Use the Code Block button instead of the Inline Code button.
That's because you are only changing the position of the handle on line 8.