Im using .Touched and .TouchEnded events to make "Capture Zones". I'm trying to make the Vector2 X plane to slowly shrink in size after being not touched. I know that {0,1-1} in line 28 may be wrong, I just forgot how to reference the Size it was before. I may even be completely wrong in general.
local captured = false
captureZone = game.Workspace["Location A"].CaptureZone
location = game.Workspace["Location A"]
game.Players.PlayerAdded:Connect(function(player)
if player.Team == game.Teams.viking or game.Teams["viking chieftan"] or game.Teams["viking king"] then
if captured ~= true then do
script.Parent.Parent.CaptureZone.Touched:Connect(function()
captureZone.BrickColor = BrickColor.new("Bright red")
wait(1)
captureZone.BrickColor = BrickColor.new("Medium stone grey")
wait(1)
if location.A.BillboardFrame.Viking.Size ~= Vector2({0,200},{0,50}) then
wait(1)
location.A.BillboardFrame.Viking.Size = Vector2({0,1+2},{0,50})
if location.A.BillboardFrame.Viking.Size == Vector2({0,200},{0,50}) then
captured = true
end
end
end)
end
end
end)
script.Parent.TouchEnded:Connect(function()
if location.A.BillboardFrame.Viking.Size ~= Vector2({0,1},{0,50}) then do
wait(1.5)
location.A.BillboardFrame.Viking.Size = Vector2({0,1-1},{0,50})
end
end
I'm also getting an error at "end)": Workspace.Location.A.CaptureZone.CaptureScript:5:')' expected (to close '(' at line 23) near 'end'. I'm Confused. It doesn't change color either. If anyone can improve this please help lol.

2 comments
I'm not the greatest scripter, so Is there any way I could make it to where if a player is inside the part, the .Touch continues to run?
You can try Region3 and check that parts of the player in the designated region