Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I disable swimming with water terrain? How do I spawn in water?

Asked by 4 years ago

I have two questions, how you disable swimming and how you spawn in water. For the first question, how to disable swimming, I just want the player to ignore the water and act like it is air. They see the water, but do not come in contact with it. With the second question I am just confused that player spawn is in the water but then when I start the game I spawn on top of the water. I want the character to spawn in the water and not to be able to swim up.

0
You can aslo create a part with CanCollide off and water texture... WoTrox 345 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")

hum:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)
0
And if you need spawn in water you need teleport player's character directry to SpawnPosition ArtemVoronin0 171 — 4y
Ad

Answer this question