I tried writing prints but the only one that successfully sent a console message was the first one. What I am trying to make is a part that gives a value to the other team when touched. I do call the function later on in the script. I get no errors in the output whatsoever.
local p = script.Parent
local w = workspace
local r = w.RedScore
local b = w.BlueScore
print"Variables"
function Touch(hit)
if hit.Parent:FindFirstChild("Humanoid")then
print"Humanoid"
if hit.Parent.TeamColor == BrickColor.new("Bright blue")then
r = r + 1
elseif
hit.Parent.TeamColor == BrickColor.new("Bright red")then
b = b +1
end
print"If"
end
Thanks for helping. :)

8 comments
Are there BrickColor values inside the character? Or are you using roblox's classic team system?
The classic system.
Alright.
Are the RedScore and BlueScore values? Like Number or Int Values?
Yes. IntValues.
Alright.
What's the name of the Blue and Red team inside the explorer panel?
Blue and Red.