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

How to get a Gui to The players gui using cloning?

Asked by
mnaj22 44
8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
if script.Parent.Parent.Parent.TeamColor == "Bright red" then
    local s = game.Lighting.RedSold:Clone()
    s.Parent = script.Parent
end

I'm trying to get a gui (RedSold) from lighting and into the Starter Gui in the Player.PlayerGui

1 answer

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

Since it's a BrickColor value, you need to use BrickColor.new!

if script.Parent.Parent.Parent.TeamColor == BrickColor.new("Bright red") then
    local s = game.Lighting.RedSold:Clone()
    s.Parent = script.Parent
end
Ad

Answer this question