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

How Can I Stop The Physics of Another Player?

Asked by 5 years ago
Edited 5 years ago

I was trying to do a script where a player can drag another player using a rope, everything worked as intended except for one part, the player's physics. Is there a way to change the player's state in a way where the player can feel like a dead person but not necessary be dead. The best results that i got is by enabling the platformstand but even then it doesn't feel the way it should.

This is the local script(just in case):

local uis = game:GetService("UserInputService")
local grab = false

uis.InputEnded:Connect(function(i, gpe)
    if i.KeyCode == Enum.KeyCode.Z and gpe == false then
        if grab == false then
            grab = true
            return
        end
        if grab == true then
            grab = false
            return
        end
    end
end)

spawn(function()
    script.Parent.Humanoid.Touched:Connect(function(hit)
        if grab == true then
            if hit.Parent:FindFirstChild("Humanoid") ~= nil then
                print("got you")
                game:GetService("ReplicatedStorage"):WaitForChild("just because"):FireServer(hit)
                grab = false
                return
            end
            if hit.Parent:FindFirstChild("Humanoid") == nil then
                grab = false
                print("Mission Failed, We Will Get Him Next Time")
                return
            end
        end
    end)
end)

This is the script(just in case):

local reps = game:GetService("ReplicatedStorage")
local jb = reps:WaitForChild("just because")

jb.OnServerEvent:Connect(function(player, hit)
    hit.Parent.Humanoid:ChangeState(16)
    hit.Parent.Humanoid.PlatformStand = true
    local weld = Instance.new("RopeConstraint")
    weld.Name = "GOTYOU"
    weld.Parent = player.Character.RightHand
    weld.Attachment0 = player.Character.RightHand.RightGripAttachment
    weld.Attachment1 = hit.Parent.Head.NeckRigAttachment
    weld.Length = 10
    weld.Visible = true
end)
0
Anchoring the HumanoidRootPart? DeceptiveCaster 3761 — 5y
0
im not sure how to do it, but you can ragdoll the player Fad99 286 — 5y
0
Good question. I would try adding a body velocity that goes upwards but isnt strong enough to carry the player. Then you could set the caught players walkspeed and jumppower to 0? cmgtotalyawesome 1418 — 5y
1
For my suggestion to work you would also have to create an animation which would be tedious cmgtotalyawesome 1418 — 5y
View all comments (5 more)
0
^ starmaq 1290 — 5y
0
yeah best choice, you'd have to perfect that thouh starmaq 1290 — 5y
0
I'd think that best choice would be to ragdoll a player instead of an animation, then use a rope constraint and decrement the weld length over a period of time. (or don't decrement it, if you just want to walk around with them on a rope) SteamG00B 1633 — 5y
0
Oh also probably should disable the player's input if you have special moves or something because otherwise that might cause a lot of problems. SteamG00B 1633 — 5y
0
Rag dolling would work better as Steam said, I just don't know how to do it and I'm against taking things from the catalog. cmgtotalyawesome 1418 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

I would ragdoll the player being dragged so they look dead. While they are ragdolled, you can disable their inputs.

Here is a post by TheGamer101 on disabling inputs: https://devforum.roblox.com/t/how-to-temporarily-disable-all-character-input/178365/2?u=phantomvisual

For the ragdoll, I found a couple of scripts that you can use as a reference. These are from developers on the DevForum when ROBLOX released the Humanoid.BreakJointsOnDeath property.

Fm_Trick: https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053/13?u=phantomvisual

Nezuo: https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053/17?u=phantomvisual

If you want to fake a death, you can use Humanoid:SetStateEnabled() and set the Dead state to false (or find a state that works with what you are trying to achieve). https://developer.roblox.com/api-reference/function/Humanoid/SetStateEnabled

Experiment with these and hopefully you can get the outcome you want. Good luck!

Ad

Answer this question