Simple Task not working

My script isnt working. It is supposed to just simply print “works” if these conditions are correct. I used print() to check the players conditions to see if they match and they do, but the if command isnt working. how can i fix this?

local folder = script.Parent.Parent

part.Touched:Connect(function(hit)

	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		if player.TeamColor == BrickColor.new("Really Red") and folder.blueflagtook.Value == false then
			print("works")
           
		end

	end
end)

It might be because "Really Red" is not a valid BrickColor. It should be "Really red" instead, as I think BrickColor is case sensitive.

It worked! Thank you so much. I took like an hour trying to figure out and didn’t realize it was just that :joy:, thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.