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

How can i make hancuffs working with remoteevent?

Asked by
Cleyvi 0
6 years ago
Edited 6 years ago

I wonder how to get hancuffs work with remoteevent? This is the local script:

script.Parent.Equipped:connect(function(m)
m.Button1Down:connect(function()
if m.Target~=nil then
print(m.Target:GetFullName())
p=nil
_,p=pcall(function() return game.Players[m.Target.Parent.Name] end)
print(p)
print(m.Target.Parent.Name)
if p~=nil then
local detained=p
coroutine.wrap(function()
        local c=p
        while p==c do wait() pcall(function()
                p.Character.Torso.Anchored,p.Character.Torso.CFrame=true,game.Players.LocalPlayer.Character.Torso.CFrame*CFrame.new(0,0,-2.5)
        end) end
        print('END OF DETAIN LOOP')
        pcall(function() c.Character.Torso.Anchored=false end)
end)()
else print('no p') end
end
end)
end)
0
Please use a code block. It's the last option at the top when you edit. KingLoneCat 2642 — 6y
0
Please someone? Cleyvi 0 — 6y

Answer this question