Is there a method to disable swimming? – Constructing Assist – Developer Forum

This web page was created programmatically, to learn the article in its authentic location you may go to the hyperlink bellow:
https://devforum.roblox.com/t/is-there-a-way-to-disable-swimming/3922355
and if you wish to take away this text from our website please contact us


Im engaged on my sport, the place gamers are on a remoted important island the place the sport takes place, however i need the gamers to fall by way of the water every time they stand on it, like a component with CanCollide = false, i attempted utilizing a component to characterize water, however its nicer to simply use water. i attempted utilizing a swim controller however i don’t know the way they even work. is there a method to make that?

For reference when i mentioned water i meant terrain water.

Use the Humanoid SetStateEnabled and specify utilizing the Swimming enum. There’s extra element and a code instance within the documentation hyperlink:



2 Likes

thanks rather a lot! unwell look proper now



1 Like

Put a neighborhood script inside starter character scripts and paste this code into it:

native character = script.Parent
native humanoid = character:WaitForYoungster("Humanoid")

humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)



2 Likes

unwell attempt it now, hopefully it really works

it really works! i actually didn’t knew a lot about humanoid states, i ought to look into them. anyway thanks!


This web page was created programmatically, to learn the article in its authentic location you may go to the hyperlink bellow:
https://devforum.roblox.com/t/is-there-a-way-to-disable-swimming/3922355
and if you wish to take away this text from our website please contact us

Leave a Reply

Your email address will not be published. Required fields are marked *