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

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

2 answers

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

Here

wait(3)
if script.Parent.BrickColor == BrickColor.new("Really red") then
    h = Instance.new("Hint")
    h.Parent = game.Workspace
    h.Text = "Motor Over Heating"
    wait(8.5) -- Change back to 4, I just like to have it to where it is made sure people read it.
    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)
end
Ad
Log in to vote
1
Answered by
tumadrina 179
10 years ago
wait(3)
if script.Parent.BrickColor.Name == "Really red" then
    h = Instance.new("Hint", game.Workspace)
    h.Text = "Motor Over Heating"
    wait(4)
    h:Destroy()
end

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

just in case, Hint are depricated

Answer this question