To press E for inventory :
IN A LOCALSCRIPT
mouse = game.Players.LocalPlayer:GetMouse()
open = false
mouse.KeyDown:connect(function(key)
if key == "e" then
if open == false then
open = true
game.Players.LocalPlayer.PlayerGui.StarterGui.Inventory.Visible = true
else
open = false
game.Players.LocalPlayer.PlayerGui.StarterGui.Inventory.Visible = false
end
end
end)
To give tool :
PUT IN NORMAL SCRIPT IN PART TO TOUCH
script.Parent.Touched:connect(function(part)
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
tool = game.ReplicatedStorage.Tool:Clone()
tool.Parent = player.Backpack
end
end)
Should work, Good luck.
3 comments
THANKS SO MUCH
can you click correct answer so i can get reptuation up?
i didnt work