local plr = game.Players.LocalPlayer local rep = game.ReplicatedStorage events = {} script.Parent:WaitForChild("start").MouseButton1Click:Connect(function() script.Parent.nums.Visible = true for i,v in pairs(script.Parent.nums:GetChildren()) do local first = v.MouseButton1Click:Connect(function() for i,e in pairs (events) do e:Disconnect() e = nil end print(#events) end) table.insert(events,first) end print(#events) end)
Basically i put the event's in a table then i scan through the whole table and try to disconnect them all but when i print #events after i disconnected them AND made them nil it still says 6 event's??