Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is my If statment not working properly? (Ansvered)

Why is it not printing i didn't misspell anything, the part is that color like i don't get it can someone explain what i did wrong like this sounds soo logic but for some reason it's not.

if  workspace.Part.BrickColor == "Medium stone grey then" then
	print("Yes it's Grey") 
end

1 answer

✓ Accepted answer
  1. You added an extra "then" inside the BrickColor name

  2. BrickColor can only be called by adding "BrickColor.new" to the string

Revised:

if workspace.Part.BrickColor == BrickColor.new("Medium stone grey") then
	print("Yes it's Gray")
end

1 comment

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.