Hier einmal der code überarbeitet für dich
local A = game.Workspace.A
local B = game.Workspace.B
local C = game.Workspace.C
local c = 0
local q = 0
local o = false
A.Touched:Connect(function(D)
q = 1
o = true
end)
B.Touched:Connect(function(E)
q = 2
o = true
end)
C.Touched:Connect(function(F)
q = 1
o = true
end)
while true do
local d = game.StarterGui.ScreenGui.TextLabel
if o == true then
c = c + q
print(c)
o = false -- Reset `o` to false after updating `c`
end
wait(1)
d.Text = tostring(c)
end