My GUI wont show up?

well, I heard of it when I was learning how to script in an article. Also yes it’s a local script and it’s in the button. Here is a photo.494db99ae132ba87c30c3dfe94033e97

1 Like

here is how it looks like when I run the game. it’s also the same if I play it.


if you look at StarterGUI you only see the ScreenGUI with nothing in it

1 Like

You’re looking through the server’s perspective, you’re Using the Run button. Click on the arrow under Run and click Play Game

1 Like

oh thanks :slightly_smiling_face:, also a quick tip is to remove

local player = game.Players.LocalPlayer
local button = script.Parent -- i know this is useless and inconvenient but sometimes this is the cause, only a bit of extra work am i right?

and try to do this,Roblox automaticall does the player that interacted with the specified object so try this by replacing only the function:

script.Parent.MouseButton1Click:Connect(function(player) -- like i said earlier, automatically the player :D
    local success, Error = pcall(function()
        return SocialService:CanSendGameInviteAsync(player)
    end

    if Error then -- automatically equals true :D
        SocialService:PromptGameInvite(player)
    end
end)

MouseButton1Click doesn’t return anything, you need to make a variable for the localplayer, his method was fine

@oscoolerreborn His issue is that he’s looking at it from the Server, the server can’t see client sided stuff, such as the guis. You can tell he’s running it from the server from the Green outline, he’s testing in Run mode, he has to do it in Play Game mode, which is just clicking that down arrow under Run and pressing Play Game, or I think F5 is the shortcut to it

1 Like

Don’t worry about the starterGui, go to the “Players” Service (in game) and press your name, then press PlayerGui and everything is there!

like I said, the same thing happens when I click game.

1 Like

Is the ScreenGui Enabled and is the Button Visible? Likely the SCreenGui is disabled or the Button is not visible if it still doesn’t appear in Play Game mode


as I said before still doesnt work when I play game.

1 Like

ill try it, thanks! :slightly_smiling_face:

1 Like

OHH, I understand what you mean, your 100% correct! Also, I seen you many times in other topics, as you said, F5 is the correct shortcut! :happy2: You can also try a play test, if you go to “Test” on the top and then start a server with only 1 player!

Are you certain you didn’t Disable the ScreenGui or make the Button invisible?

I FIXED IT!! WHILE I WAS MAKING I UNCHECKED ARCHIVABLE. :grinning:

2 Likes

(post marked for deletion for privacy reasons)

3 Likes

thank you everyone for helping! I’ll see you around the devforum! :grinning:

2 Likes

:smiley: make your comment the solution so others can find it if they have the same problem :smiley: yay!

1 Like