Answered by
2 years ago Edited 2 years ago
The script gets put into the player's PlayerGui after the player joins the game; therefore, the PlayerAdded
event will not fire for that player, as the player is already in the game before the script is created.
As the script is a descendant of the PlayerGui, you can use the FindFirstAncestorOfClass
method to get the player's PlayerGui.
1 | local PlayerGui = script:FindFirstAncestorOfClass( "PlayerGui" ) |
3 | script.Parent.MouseButton 1 Click:Connect( function () |
4 | PlayerGui.hui.ImageLabel.UploadTab.Visible = true |