I wanna make a I/E to open inventory but using free models, my own programming, youtube videos
DOESNT WORK??
current code:
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType then
if input.KeyCode == Enum.KeyCode.I then
game.StarterGui.Craft.Enabled = true
if game.StarterGui.Craft.Enabled == true then
game.StarterGui.Craft.Enabled = false
end
print(game.Players.LocalPlayer.Name..' has pressed U.')
end
end
end)
this is so weird
FIX:
Solution script ended up needing to be in startplayerscripts
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.I then
game.StarterGui.Craft.Enabled = true
if game.StarterGui.Craft.Enabled == true then
game.StarterGui.Craft.Enabled = false
end
print(game.Players.LocalPlayer.Name..' has pressed U.')
end
end)