Attempting to make a passive script that removes the players weapon if selected, so far this is what i have which doesnt work. A local script that clones in the player when activated.
function getTool()
for _, kid in ipairs(script.Parent:GetChildren()) do
if kid.className == "Tool" then
kid.Parent = game.Players.LocalPlayer.Backpack
end
end
end
getTool()

4 comments
Do you call this function at any given moment trough the local script ?
yeah, forgot to add that above, still can't figure it out..:/
Technically, it should be ClassName. But I just tested it with className and it seemed to work just fine. The problem likely lies elsewhere, perhaps in the children of script.Parent.
Figured it out, just needed to add a simple loop. thanks guys