So im tryna make a skillbar system, i also have made a menu of sorts with keybinds, my issue is that whenever I try setting an attack to a specific key on my skillbar it sets the skill for all skill boxes. I’m trying to make it set to the specific number I choose rather then all of them
`local Players = game:GetService(“Players”).LocalPlayer
local PlayerGui = Players.PlayerGui
local rs = game:GetService(“ReplicatedStorage”)
local screengui = script.Parent.Parent.Parent
local keybindgui = screengui:WaitForChild(“Frame”).Keybindsgui
local k1 = keybindgui.Keybind1
local k2 = keybindgui.Keybind2
local attackevent = rs:WaitForChild(“Attackevent”)
local abilitiesfolder = Players.abilitiesfolder
local ShockWaveAttack = abilitiesfolder.ShockWaveAttack
local HotBarValue = abilitiesfolder.HotBarValue
local attackName = abilitiesfolder.attackName
local HotbarTable = {
PlayerGui.HotBarGui.HotbARframe.Ability1TextLabel,
PlayerGui.HotBarGui.HotbARframe.Ability2TextLabel,
PlayerGui.HotBarGui.HotbARframe.Ability3TextLabel,
PlayerGui.HotBarGui.HotbARframe.Ability4TextLabel,
PlayerGui.HotBarGui.HotbARframe.Ability5TextLabel,
PlayerGui.HotBarGui.HotbARframe.Ability6TextLabel,
PlayerGui.HotBarGui.HotbARframe.Ability7TextLabel,
}
HotBarValue.Changed:connect(function()
for i, v in pairs(HotbarTable) do
i = HotBarValue.Value
v.Text = attackName.Value
print(i)
end
end)
k1.MouseButton1Click:Connect(function()
local abilitiesfolder = Players.abilitiesfolder
local HotBarValue = abilitiesfolder.HotBarValue
HotBarValue.Value = 1
end)
k2.MouseButton1Click:Connect(function()
local abilitiesfolder = Players.abilitiesfolder
local HotBarValue = abilitiesfolder.HotBarValue
HotBarValue.Value = 2
end)
`