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.
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
You’re looking through the server’s perspective, you’re Using the Run
button. Click on the arrow under Run
and click Play Game
oh thanks , 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
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.
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
ill try it, thanks!
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! 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.
(post marked for deletion for privacy reasons)
thank you everyone for helping! I’ll see you around the devforum!
make your comment the solution so others can find it if they have the same problem yay!