I'm trying to force a player to equip a tool by simply cloning it from ServerStorage into their Character model. Although this works fine in Play Solo, when I play online it doesn't work. Although the tool does clone into the character model, it appears to not be welded or positioned correctly on the arm. The Handle spawns at a single point in the world, then falls and gets deleted. What can I do to fix this?
Here's the code, although it's really not the problem, you can use it for reference.
local box = script.Parent.SelectionBox
local weaponName = script.Parent.Name
local weapon = game.ServerStorage:WaitForChild(weaponName)
script.Parent.Touched:connect(function(hit)
--Check for projectile
if not hit or not hit.Parent then return end
local chr = hit.Parent
local hum = chr:FindFirstChild("Humanoid")
if hum and hum.Health > 0 and not chr:FindFirstChild(weaponName) and box.Visible then
box.Visible = false
local tool = weapon:Clone()
tool.Parent = chr
wait(5)
box.Visible = true
end
end)

6 comments
Clone it to their backpack then force them to equip it
How?
x = game.ServerStorage["TOOL NAME HERE"]:Clone(); game.Players.Player1.Character.Humanoid:EquipTool(x);
Hmm, Tested the code it seems to work
No response from asker .. oh well
I'm not online 24/7 :/. Anyways, it doesn't work. It works on PlaySolo, but online it does the same thing as before. This is because the wiki says "This item behaves in the same way as parenting a tool to a Player's character." http://wiki.roblox.com/index.php?title=EquipTool