Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[BrickColor] Please Help?

Asked by 10 years ago

I want to check a brick color of a part but this isnt working! Please Help! :D

1wait(3)
2if script.Parent.BrickColor == "Really red" then
3    h = Instance.new("Hint", game.Workspace)
4    h.Text = "Motor Over Heating"
5    wait(4)
6    h:Remove()
7end

2 answers

Log in to vote
0
Answered by
IcyEvil 260 Moderation Voter
10 years ago

Here

1wait(3)
2if script.Parent.BrickColor == BrickColor.new("Really red") then
3    h = Instance.new("Hint")
4    h.Parent = game.Workspace
5    h.Text = "Motor Over Heating"
6    wait(8.5) -- Change back to 4, I just like to have it to where it is made sure people read it.
7    h:Destroy() -- 'Remove' Is Old, Use Destroy, Remove Removed it, but Causes errors(It is pretty Old) Destroy Destroys it and Causes no errors(New but can cause error if used Wrongly)
8end
Ad
Log in to vote
1
Answered by
tumadrina 179
10 years ago
1wait(3)
2if script.Parent.BrickColor.Name == "Really red" then
3    h = Instance.new("Hint", game.Workspace)
4    h.Text = "Motor Over Heating"
5    wait(4)
6    h:Destroy()
7end

it should be BrickColor.Name since the name is a string

just in case, Hint are depricated

Answer this question