I just tried this script and i don’t know why it didn’t work can you help me out?
01 | local player = game.Players.LocalPlayer |
02 |
03 | local clone = game.Workspace.Handgun:Clone() |
04 |
05 | local mouse = script.Parent.MouseClick:Connect( function (mouse) |
06 |
07 | if mouse then |
08 |
09 | clone.Parent = player.Backpack |
10 |
11 | end |
12 |
13 | end ) |
How do you give players a tool when the mouse get clicked like in Prison Life!
Thank you for reading this!
1 | local Clickdect = --the location of your click detector |
2 | local klone = game.Workspace.Hangun.clone() |
3 | Clickdect.MouseClick:Connect( function () |
4 | klone.Parent = game.Player.LocalPlayer.Backpack |
5 | end ) |