Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Swimming how to disable ?

Quick question how do you disable it so when u fall in water u don't swim, just walk ?

1 answer

✓ Accepted answer

Yes, there is a very easy way of doing this.

There's a neat function I just learned about called SetStateEnabled. All you have to do is give it a State and tell it whether it can set it or not.

-- In a local script
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local hum = char:WaitForChild("Humanoid")

hum:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)
This should be possible with a regular script as well, but for simplicity I used a Local Script.

Good Luck

If I did help, don't forget to accept my answer please.

This discussion is preserved as it was. New answers, comments, and votes are closed.