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

Hey, this isn't working, what am I doing wrong?

while true do
wait()
if script.Parent.Parent.Parent.Parent.TeamColor == "Brown" then
script.Parent.Image = "http://www.roblox.com/asset/?id=141566394"
wait(15)

end
end

The parent of this script is an image label, whose parent is a ScreenGUI, whose parent is StarterGUI.

2 comments

0

Also, uhh, I gotta mention, it doesn't work when switching to another team, in another script.

0

This only sets the image when the team color is brown. What should happen when the team color is not brown? (Aka, what exactly is going wrong?)

1 answer

Okay so this might be the problem, not entirely sure but firstly with colors in scripts you have to put (in this case, BrickColor.new but there's also several other ones) BrickColor.new("Color name here"). Secondly, with images, they have to follow the proper format. The link is rbxassetid://(ID number minus 1).


--For the color part, you would put
TeamColor == BrickColor.new("Brown") then
script.Parent.Image = "rbxassetid://141566393"

More details on BrickColor here

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