Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make it so multiple people can receive the tool upon triggering a prompt?

I've looked at basic tutorials that only let YOU pick up the tool because the tool goes inside the person's backpack if they triggered it and the tool disappears. How would I make it so multiple people can pick it up? This is the script


local tool = game.ServerStorage.AdvancedFlashlight

local prompt = script.Parent.ProximityPrompt



local function pickup(player)

	

	tool.Parent = game.Workspace[player.Name]

end



prompt.Triggered:Connect(pickup)

The actual tool itself is in server storage, so if the player steps on the duplicate handle in the workspace, it won't give them the part. However if someone does trigger the prompt it gives them the tool, but if someone else triggers it, it steals the tool and gives it to that player who triggered it.

1 comment

0

can you add the script you tried?

1 answer

✓ Accepted answer

when you're doing

tool.Parent = game.Workspace[player.Name]

you're taking the tool from the server storage and moving it to the player, and then when you try to get the tool again it won't be there.

so you'll have to clone it first and then move it to the player

tool:Clone().Parent = game.Workspace[player.Name]

This discussion is preserved as it was. New answers, comments, and votes are closed.