So im testing out my control points system and it adds the point of the first capture but never removes and adds the point of the second capture? Hoping someone can help.
local pointAddedDefender = false
local pointAddedAttacker = false
while true do
wait(0.00001)
if script.Parent.defenderOccupied.Value == 1 and pointAddedDefender == false then
pointAddedDefender = true
pointAddedAttacker = false
game.Workspace.scoreKeeper.defendersPoints.Value = game.Workspace.scoreKeeper.defendersPoints.Value + 1
if game.Workspace.scoreKeeper.attackersPoints.Value >=1 then
game.Workspace.scoreKeeper.attackersPoints.Value = game.Workspace.scoreKeeper.attackersPoints.Value - 1
pointAddedAttacker = false
end
end
if script.Parent.attackerOccupied.Value == 1 and pointAddedAttacker == false then
pointAddedAttacker = true
pointAddedDefender = false
game.Workspace.scoreKeeper.attackersPoints.Value = game.Workspace.scoreKeeper.attackersPoints.Value + 1
if game.Workspace.scoreKeeper.defendersPoints.Value >=1 then
game.Workspace.scoreKeeper.defendersPoints.Value = game.Workspace.scoreKeeper.defendersPoints.Value - 1
pointAddedDefender = false
end
end
end
Here is the scorekeeper script for reference
local hint = Instance.new("Hint")
hint.Parent = workspace
while true do
wait(0.1)
hint.Text = "Worm Cult Points: " .. script.defendersPoints.Value .. " Hostile points: " .. script.attackersPoints.Value
end

7 comments
mmm, the scorekeeper script you added doesnt change the value of the "defenderOccupied" or "attackerOccupied" variables, if you have a script that changes those then adding that for reference would help
The script that you improved was the script that changed the value the scorekeeper just manages the score text
The script i improved changes the "dscore" and "ascore" variables, i need to know what is changing the "doccupy" and "aoccupy" values, since if they are always "1" idk why you'd need them...
they tell that the point has been captured by either team and never rise above one
hmmm, can you add me to a team create so i can check myself? there's definitely something im missing
yeah sure do you have discord so we can talk about it easier than comments
SerpentineKing#0155