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

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

Asked by
Resnex 60
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
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.

0
Also, uhh, I gotta mention, it doesn't work when switching to another team, in another script. Resnex 60 — 10y
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?) jobro13 980 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

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

Ad

Answer this question