I have a script that teleports a victim when it is touched by handcuffs and also changes a bool value. The bool value is a child of the player and I can't figure out how to call the player
script.Parent.CuffEvent.OnServerEvent:Connect(function(player, victim)
victim.CFrame = game.Workspace.Prison.prisonpart.CFrame
local victimplayer = victim.Name
game:GetService("Players").victimplayer:WaitForChild("IsArrested").Value = true
end)
any help?

1 comment
The parameter is the model object of the player's character, so make sure that is being passed on.