I was looking at cookies cuff system tutorial I managed to do everything but the cuff assign group thing isn’t working, could you please help me with this?
local GroupId = 16532543
local MinId = 6
game.Players.PlayerAdded:Connect(function(Player)
if Player:GetRankInGroup(GroupId) >= MinId then
wait(5)
local Cloned_Tool = game.ReplicatedStorage.ArrestSystem.Model.Cuffs:Clone()
Cloned_Tool.Parent = Player.Backpack
end
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage").ArrestSystem
local ArrestUser = ReplicatedStorage:WaitForChild("ArrestUser")
local ReleaseUser = ReplicatedStorage:WaitForChild("ReleaseUser")
local AntiReset = ReplicatedStorage:WaitForChild("AntiReset")
local function AntiResetF(PlayerInstance, Status)
AntiReset:FireClient(PlayerInstance, Status)
end
local function ReleaseUserF(Player)
local P2 = Player.Character.HumanoidRootPart.CuffWeld.Part1
local P2Instance = game.Players:FindFirstChild(P2.Parent.Name)
Player.Character.HumanoidRootPart.CuffWeld:Destroy()
for i,v in ipairs(P2.Parent:GetDescendants()) do
if v:IsA("MeshPart") then
v.Massless = false
end
end
P2.Parent.Humanoid.WalkSpeed = 16
P2.Parent.Humanoid.JumpPower = 50
P2.Parent.Humanoid.PlatformStand = false
AntiResetF(P2Instance, true)
end
ArrestUser.OnServerEvent:Connect(function(Player, Victim)
local PlayerInstance = game.Players:FindFirstChild(Victim.Parent.Name)
local P1 = Player.Character.HumanoidRootPart
local P2 = Victim
local offset = Vector3.new(0,0.015,-2)
Victim.CFrame = P1.CFrame*CFrame.new(offset)
local NewConstraint = Instance.new("WeldConstraint")
NewConstraint.Parent = P1
NewConstraint.Part0 = P1
NewConstraint.Part1 = P2
NewConstraint.Name = "CuffWeld"
P2.Parent.Humanoid.PlatformStand = true
Victim.Parent.Humanoid.WalkSpeed = 0
Victim.Parent.Humanoid.JumpPower = 0
for i,v in ipairs(Victim.Parent:GetDescendants()) do
if v:IsA("MeshPart") then
v.Massless = true
end
end
AntiResetF(PlayerInstance, false)
print("Arrest!")
end)
ReleaseUser.OnServerEvent:Connect(function(Player)
ReleaseUserF(Player)
end)
On your video you said if we wanna make a script for only a specific rank and group then we write that script, but the thing is on the game everyone that isn’t in the group also has the cuffs. And I am testing this on a dummy
I just go in game I have 2 teams made one that isn’t supposed to have it and the other is supposed to have it but the one that isn’t supposed to have it has it