PLEASE READ ALL OF THIS TO KNOW WHAT'S GOING ON:
First of all:
- StarterGui is just an object to STORE GUIs, when a player joins, the GUIs stored in StarterGui will be replicated to the player, where? in Player.PlayerGui.
- Why the
wait(1)? I'm not saying it's not okay, it's just that it's unnecessary in this case.
- Please use
:Connect() instead of :connect(); this one is deprecated.
These are things you need to know when using GUIs:
- You should ONLY do stuff to GUIs using LocalScripts.
- LocalScripts have access to
game.Players.LocalPlayer, while the regular ones doesn't.
Now, the script you want is this:
script.Parent.MouseButton1Click:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScreenGui2.Frame.TextLabelA1.BackgroundColor3 = Color3.fromRGB(27, 45, 45)
end)
1 comment
http://wiki.roblox.com/index.php?title=Player_vs._Starter_GUIs