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

How can i make a player's character float in water while platform standing? [SOLVED]

Asked by
Dexiber 272 Moderation Voter
4 years ago
Edited 4 years ago

If you need the answer as well, check it out in the answers section, 2nd one.

0
This isn't descriptive enough. Offer context. DeceptiveCaster 3761 — 4y
0
Ok Dexiber 272 — 4y

2 answers

Log in to vote
0
Answered by
ae_su -5
4 years ago

I think HumanoidStateType will do it.

https://developer.roblox.com/en-us/api-reference/enum/HumanoidStateType

Here is an example:

local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")

Humanoid.StateChanged:Connect(function(Old, New)
    if New == Enum.HumanoidStateType.Swimming then
        -- If the character is in the water
        print("Character is swimming")
    else
        -- If the character is not in the water
        print("Character is not swimming")
    end
end)
0
I really don't think this would work. When a ragdoll script activates it disables all Humanoid actions, including animations, so that the character cannot be controlled and thus it lays without separating. That being said, since the Humanoid is basically disabled, StateType will not work. DeceptiveCaster 3761 — 4y
0
i know about this, but platform stand is going to be the only humanoid state until the character decides to un - ragdoll. Dexiber 272 — 4y
Ad
Log in to vote
0
Answered by
Dexiber 272 Moderation Voter
4 years ago

Never mind, i fixed it.

For the people that came here for answers as well:

Don't use platform stand, if you do you would need to add fake limbs to collide with the map, instead use Enum.HumanoidStateType.Physics.

This will make the characters parts collide and will let you float on water.

Answer this question