I'm trying to make a sound play when you're swimming in water, but when I do it plays it even though it's already playing which makes an unwanted effect.
wait(1) local P = game.Players.LocalPlayer local character = workspace:WaitForChild(P.Name) local s = Instance.new("Sound", P.PlayerGui) s.SoundId = script.Underwater.SoundId P.Character.Humanoid.Swimming:Connect( function() s:Play() end )