Hi there. So today I tried to make a wanted level script where if you shoot a cop you become wanted. I decided to use a value for the wanted level and a script that makes the value go up.
if script.Parent.Humanoid.Health == 0 then
workspace.WantedStars.Value = workspace.WantedStars.Value + 1
end
Then inside the value, I added a script that detects if the value went up. If it did, then it makes the cops hostile.
if script.Parent.Value == 1 then
workspace.Police1["NPC AI"].Disabled = false
workspace.Police2["NPC AI"].Disabled = false
workspace.Police4["NPC AI"].Disabled = false
workspace.Police3["NPC AI"].Disabled = false
workspace.Police5["NPC AI"].Disabled = false
workspace.Police6["NPC AI"].Disabled = false
workspace.Police7["NPC AI"].Disabled = false
workspace.Police8["NPC AI"].Disabled = false
end

2 comments
I figured out the problem.. sort of. This is just a guess but I think the scripts that are supposed to be enabled break and the character does not shoot me even after killing them
Well I think the problem is with the script that gives you a wanted level when you kill the npc. Whenever I kill them, the value doesn't go up!