I need it for my game, i looking for tool script or something for 2 days and i cant find the way
You can do something like this. Using :Clone() to duplicate an instance.
1 | local tool -- tool's location |
2 | local clickdetector -- click detector location |
3 |
4 | clickdetector.MouseClick:Connect( function (plr) |
5 | local tool_cloned = tool:Clone |
6 | tool_cloned.Parent = plr.Backpack |
7 | end ) |