Bugs with using swimming independently of terrain

To test out-of-water swimming, set gravity to zero and use the following function:

function startSwimming()
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)
	Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
end

Bug 1:
There is no speed cap on the acceleration from holding the space bar.

Bug 2:
This one only started happening a few weeks ago, but enabling swimming in the way I showed prints this error:
19:44:59.481 - Workspace.complexo.Sound.LocalSound:261: attempt to compare number with nil
19:44:59.481 - Stack Begin
19:44:59.484 - Script ‘Workspace.complexo.Sound.LocalSound’, Line 261 - field ?
19:44:59.484 - Script ‘Workspace.complexo.Sound.LocalSound’, Line 360 - global stateUpdated
19:44:59.492 - Script ‘Workspace.complexo.Sound.LocalSound’, Line 382
19:44:59.492 - Stack End

This topic was automatically closed after 1 minute. New replies are no longer allowed.