I am attempting to stop the animation, I’ve tried all of the solutions I know which is just rearranging code. It does not give me any output.
--// Variables || Made By CarbonFiber, edited by zaslonn
local eventFolder = game.ReplicatedStorage
--// Services
local dss = game:GetService('DataStoreService')
local TextService = game:GetService("TextService")
--// Events
local tieEvent = eventFolder.TieEvent
--// Functions
function CheckForTool(player)
local char = player.Character
local result = false
for _,v in pairs(char:GetChildren()) do
if v and v:IsA('Tool') and v:FindFirstChild('Authenticate') then
local auth = require(v:WaitForChild('Authenticate'))
if auth and auth.Type == 'Ziptie' then
result = true
end
end
end;
for _,v in pairs(player.Backpack:GetChildren()) do
if v and v:IsA('Tool') and v:FindFirstChild('Authenticate') then
local auth = require(v:WaitForChild('Authenticate'))
if auth and auth.Type == 'Ziptie' then
result = true
end
end
end;
return result
end;
--// Event Connections
tieEvent.OnServerEvent:connect(function(player,otherPlayer,mode,etc,config)
local handcuffTool = game.ServerStorage.Handcuffed:Clone()
local animation = otherPlayer.Character.Humanoid.Animator:LoadAnimation(script.Animations.Handcuffed)
if otherPlayer then
if mode == 'Tie' then
local plrChar = player.Character
local otherChar = otherPlayer.Character
local result = CheckForTool(player)
if not result then
player:Kick('Exploit Action was recorded and sent to ROBLOX Servers for moderation.')
end;
--animator = otherPlayer.Character:WaitForChild("Humanoid"):WaitForChild("Animator")
otherPlayer.Character.Humanoid:UnequipTools()
for _, child in pairs(otherPlayer.Backpack:GetChildren()) do
if child:IsA("Tool") and child.Name == "Cuffed" then
child:Remove()
end
end
handcuffTool.Name = "Cuffed"
handcuffTool.Parent = otherPlayer.Backpack
otherPlayer.Character.Humanoid:EquipTool(handcuffTool)
animation:Play()
--loadedanimations[1]:Play()
elseif mode == 'Untie' then
animation:Stop()
otherPlayer.Character.Humanoid:UnequipTools()
wait(0.1)
for _, child in pairs(otherPlayer.Backpack:GetChildren()) do
if child:IsA("Tool") and child.Name == "Cuffed" then
child:Remove()
end
end
end;
end;
end)