RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a script that when player touches a part they own everything in that model"
-- server script local function collect(player, model) for _, item in pairs(model:GetDescendants()) do if item:IsA("Tool") or item:IsA("Part") then item.Parent = player.Backpack end end end local function onTouched(part) local player = game.Players:GetPlayerFromCharacter(part.Parent) if player and part.Parent == player.Character and part.Name == "OwnedPart" then collect(player, part.Parent) end end game.Workspace.OwnedPart.Touched:Connect(onTouched)