-
What do you want to achieve? I need it so my animation will not play on both the client and the person being cuffed.
-
What is the issue? it is playing on both the person arresting and being arrested.
-
What solutions have you tried so far? Tried making it only load in that humanoid.
local folder = rs:WaitForChild("remotes")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
repeat wait()until char.Head
local newValue = Instance.new("BoolValue", char)
newValue.Name = "HandcuffValue"
newValue.Value = false
char.Parent = game.Workspace:WaitForChild("Players")
end)
end)
local Player = game.Players.LocalPlayer
local Animation = game.Workspace.Animation
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
repeat wait() until Player.Character
local Character = Player.Character
local Humanoid = Character.Humanoid
local AnimationTrack = Humanoid:LoadAnimation(Animation)
folder.handcuff.OnServerEvent:Connect(function(player,p)
AnimationTrack:Play()
wait(1)
AnimationTrack:Stop()
p.HandcuffValue.Value = true
p.Humanoid.WalkSpeed = 8