local gui = game.StarterGui.ScreenGui.Frame.Visible
script.Parent.Equipped:Connect(function() print("hola") wait(1) gui = true
end)
You're referencing the StarterGui instead of the local player's PlayerGui.
local player = game:GetService("Players").LocalPlayer local gui = LocalPlayer.PlayerGui.ScreenGui.Frame.Visible script.Parent.Equipped:Connect(function() print("hola") wait(1) gui = true end)