Hello! When I click the play button, my custom hotbar will not open. I’ve tried to use functions but nothing I do seems to work, this is what I have in my local script
local gui = script.Parent.Parent
local player = game.StarterGui.PlayerHotbar
script.Parent.MouseButton1Click:Connect(function()
gui.Enabled = false
end)
script.Parent.MouseButton1Click:Connect(function()
player.Enabled = true
end)
Nvm fixed it, I just switched the hotbars variable
local gui = script.Parent.Parent
local player = script.Parent.Parent.Parent.PlayerHotbar
script.Parent.MouseButton1Click:Connect(function()
gui.Enabled = false
end)
script.Parent.MouseButton1Click:Connect(function()
player.Enabled = true
end)
u should just fix the
> local player = game.StarterGui.PlayerHotbar
to the
> local player = game.Players.LocalPlayer.PlayerGui.PlayerHotbar
because from game ur getting to the players getting localplayer and his gui

1 Like