local player = game.Players:FindFirstChild(script.Parent.name.Value)
		if (game.Workspace:FindFirstChild(script.Parent.name.Value).Torso.Position - game.Workspace:FindFirstChild(script.Parent.name.Value.. "'s Cop").Torso.Position).magnitude < 100 then
			script.Parent.Active.Disabled = false
			script.Parent.NonActive.Disabled = true
		else if (game.Workspace:FindFirstChild(script.Parent.name.Value).Torso.Position - game.Workspace:FindFirstChild(script.Parent.name.Value.. "'s Cop").Torso.Position).magnitude > 100 then
			script.Parent.Active.Disabled = true
			script.Parent.NonActive.Disabled = false
			end
end

this script will not work i dont know what is wrong with it. in the output it says Workspace.touchme.Script:2: attempt to index a nil value

1 comment

0

One (or both) of the torsos don't exist. I'd help you fix it but this code is just too messy and I don't know where the values and stuff are located.... or even how it's supposed to work.