i want to script an inventory gui but all the tutorials don't seem to be helping
its a inventory thats supposted to hold spells aka the scripts for the spells
i was thinking like a grid with little slots and if a spell was in the slot the script would be enabled but i don't really know enough about it to put that in motion
does anybody have any advice for this type of thing, this is kinda the next big thing im supposed to do in my game and idk how to go around it or do it
#inventory issues
1 messages · Page 1 of 1 (latest)
If you’re using letter keys you can always make slot icons and a highlight if they’re selected to show they’re selected
If an item is in that slot then use a module script
local module = require(themodulescript)
module.UseSkill
Heres an example
LocalScript
local player = game.Players.LocalPlayer
local UserInputService = game:GetService(“UserInputService”)
UserInputService.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode == Enum.KeyCode.R then
if Hotbar.Slots.R.Skill.Value ~= “None” then
local module = require(game.ReplicatedStorage.Spells[Hotbar.Slots.R.Skill.Value]
module.UseSpell(player)
end
end
end)
simple way to do it
is scripting an inventory gui difficult? i mean all the tutorials i see have a lot going into them just for the thing to function im feeling a little lost
its just hard to believe almost every game has an inventory and somehow i can't seem to figure it out
what am i doing wrong