Sorry for the very stupid question it is getting late and my brain is not working properly
I am super stumped on why my loops are not working when equipped is set to false or true
When If first load in, the lua while not equipped
prints as required but the second I equip, while equipped do does not work and after i unequip while not equipped doesn’t work either.
local tool = script.Parent
local equipped = false
local player = game.Players.LocalPlayer
local test = true
tool.Equipped:Connect(function()
equipped = true
end)
tool.Unequipped:Connect(function()
equipped = false
end)
while equipped do
print("yes")
wait(1)
end
while not equipped do
print("Not")
wait(1)
end```