so i have this script that gets a tool in to a players inventory when a player clicks 'h' what i want to do is make the player be able to use that only when he is close to an item and i want the tool to dissapear after a player has clicked 'h' here is what ive made
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(Key) Key = Key:lower() if Key == 'h' then local copy = game.Workspace.Tool:Clone()
copy.Parent = game.Players.LocalPlayer.Backpack end end)

7 comments
¸thx for awnsering almost every one of my q
some thing is wrong with if mh-player... it sais Players.JollyDumb.PlayerGui.LocalScript:10: bad argument #2 to '?' (Vector3 expected, got number) 17:25:42.843 - Stack Begin
i mean it sais Players.JollyDumb.PlayerGui.LocalScript:10: bad argument #2 to '?' (Vector3 expected, got Object)
Does it work up until then? I would try adding prints in between some lines to see how far it goes.
ok i ll do it
i did the print thing and it looks like the problem is in line 4
i mean 6 not 4