hello im making a handcuff tool whenever i fire a remote to un weld the player from the one whos cuffing them the uncuffed player gets stuck in the ground
remote2.OnServerEvent:Connect(function(Player, findplayer)
game:GetService("Workspace"):FindFirstChild("Weld"):Destroy()
remote4:FireClient(findplayer)
end)
Heres a video of it happening
https://gyazo.com/398a6ff5c80d2b07c1ff1f00bf0c9a53
Downrest
(Downrest)
July 13, 2022, 10:42am
#2
What is findplayer
? Is that the handcuffed player?
Yes it is. that’s the player I’m removing the welds from
Downrest
(Downrest)
July 13, 2022, 10:45am
#4
Try this out, see if it changes anything:
remote2.OnServerEvent:Connect(function(Player, findplayer)
workspace:FindFirstChild("Weld"):Destroy()
remote4:FireClient(findplayer)
findplayer:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
findplayer:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
end)
i’d need to index the humanoid for setstate correct?
1 Like
Got a lazy solution here. By no means an all purpose solution but it should do the job.
findplayer:SetPrimaryPartCFrame(findplayer.HumanoidRootPart.CFrame + Vector3.new(0,5,0))
Just fiddle around with the Y value added so that the player if uncuffed into a position you’re pleased with.
i’d need to index character right?
findplayer is just the player instance
Ah yes findplayer.Character mb
doesnt seem to work, after removing multiple lines of code it looks like whenever i weld the player the whole character/humanoid doesnt respond.
heres the script to actually weld/cuff the player
remote.OnServerEvent:Connect(function(Player, findplayer)
local attachplayer = Instance.new("Weld")
attachplayer.Name = "Weld"..findplayer.Name
attachplayer.Parent = workspace.DetainWelds
attachplayer.Part0 = Player.Character.HumanoidRootPart
attachplayer.Part1 = findplayer.Character.HumanoidRootPart
attachplayer.C1 = CFrame.new(0, 0, 4)
findplayer.Character.Humanoid.WalkSpeed = 0
findplayer.Character.Humanoid.JumpPower = 0
findplayer.Character.Humanoid.PlatformStand = true
remote3:FireClient(findplayer, Player)
end)
Pretty sure you don’t need to set the walkspeed and jumppower if you use platformstand.
And I tested it, when using platformstand the character goes into the ground for some reason. Setting it to false restored the character tho.
Polyrabies
(Polyrabies)
July 13, 2022, 11:12am
#11
ah, thanks it works now! will make sure to make your post the solution