How do I make a loop with the swimming event, for example it checks to see if you are still swimming every second? Can anyone provide me with a template?
Here is example code of connecting the Swimming event to every new player, and each time they spawn. Using the now-standard anonymous functions.
Game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) c:WaitForChild("Humanoid").Swimming:connect(function() end) end) end)