I am trying to make a arrest script for my game. So when I try clicking on "player2" it displays an error.
Error: "Character is not a valid member of model"
LocalScript:
script.Parent.Equipped:connect(function() local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.Button1Down:connect(function() if mouse.Target.Name == "Left Leg" or mouse.Target.Name == "Left Arm" or mouse.Target.Name == "Right Leg" or mouse.Target.Name == "Right Arm" or mouse.Target.Name == "Head" or mouse.Target.Name == "Torso" then print(mouse.Target.Parent) mouse.Target.Parent.Character.Torso.Anchored = true player.PlayerGui.Arrest.Frame.Visible = true player.PlayerGui.Arrest.Suspect.Value = mouse.Target.Parent player.PlayerGui.Arrest.Frame.TextLabel.Text = "Arrest "..mouse.Target.Parent.Name.."?" end end) end)