Draw A Raft & Set Sail
682 Views
19 Executions

NoUnderwaterRagdoll

Draw A Raft & Set Sail
mcdaggitt
mcdaggittPublished 50
9 months ago
Please login to perform these actions:

NoUnderwaterRagdoll is a Draw A Raft & Set Sail script for Roblox, uploaded to ScriptBlox on Jan 29, 2026.

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Prevents you from ragdolling when hitting the water

View Raw
local person = game.Players.LocalPlayer
local body = person.Character
local humanoidr = body:WaitForChild("HumanoidRootPart")
local humanoidp = body:WaitForChild("Humanoid")

local folder = workspace:FindFirstChild(person.Name)
if folder then
    local uw = folder:FindFirstChild("UnderwaterDetection")
    if uw then uw:Destroy() end
end

local ocean = workspace:FindFirstChild("OceanTile1")
local wavemath = require(game.ReplicatedStorage.WaveMath)
local floatForce
local function keepAboveWater()
    local pos = humanoidr.Position
    local waveY = ocean.Position.Y + math.abs(ocean.Position.Y) + wavemath.GetPosition(pos.X,pos.Z,workspace:GetServerTimeNow()).Y
    if pos.Y < waveY then
        if not floatForce then
            floatForce = Instance.new("VectorForce")
            floatForce.Name = "floatForce"
            floatForce.Attachment0 = humanoidr.RootAttachment
            floatForce.RelativeTo = Enum.ActuatorRelativeTo.World
            floatForce.Parent = humanoidr
        end
        local mass = humanoidr.AssemblyMass
        floatForce.Force = Vector3.new(0, math.clamp(mass*150*(waveY-pos.Y),0,mass*2000),0)
        humanoidp:ChangeState(Enum.HumanoidStateType.GettingUp)
    elseif floatForce then
        floatForce:Destroy()
        floatForce = nil
    end
end
game:GetService("RunService").Heartbeat:Connect(keepAboveWater)
body:WaitForChild("IsRagdoll").Changed:Connect(function()
    humanoidp:ChangeState(Enum.HumanoidStateType.GettingUp)
end)


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!