#Taser.

1 messages · Page 1 of 1 (latest)

desert widget
#

Help me with a taser script when you are taser you get rag ragdoll and I need help with cuffs when you click on someone while holding cuffs you can drag them.

mighty minnow
# desert widget Help me with a taser script when you are taser you get rag ragdoll and I need he...

Got it! You want two core features for your Roblox game using Lua scripting:

  1. Taser Script: When someone is tased, they ragdoll.

  2. Cuffs Script: When cuffs are equipped and the player clicks on another, the target gets dragged.

Let’s break this down.


  1. Taser Script with Ragdoll Effect

Assuming you’re using a tool for the taser:

LocalScript (inside the Taser Tool):

local tool = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

tool.Activated:Connect(function()
local target = mouse.Target
if target and target.Parent:FindFirstChild("Humanoid") then
local targetPlayer = game.Players:GetPlayerFromCharacter(target.Parent)
if targetPlayer then
game.ReplicatedStorage.TaserHit:FireServer(targetPlayer)
end
end
end)

RemoteEvent in ReplicatedStorage:

Name it TaserHit

ServerScript:

local TaserHit = game.ReplicatedStorage:WaitForChild("TaserHit")

TaserHit.OnServerEvent:Connect(function(player, targetPlayer)
if targetPlayer and targetPlayer.Character then
local char = targetPlayer.Character
local humanoid = char:FindFirstChildOfClass("Humanoid")

    if humanoid then
        humanoid:ChangeState(Enum.HumanoidStateType.Physics)
        for _, part in ipairs(char:GetChildren()) do
            if part:IsA("BasePart") then
                part.Anchored = false
                local constraint = Instance.new("BallSocketConstraint")
                constraint.Parent = part
            end
        end
        wait(5)
        humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
    end
end

end)

desert widget
#

Were do I put this?

#

Thanks man I appreciate you

#

@mighty minnow

wise surge
#

he used chatgpt bro 😭