I would of course start with MarketplaceService.PromptGamePassPurchaseFinished but I don’t know what I should do after that. Like make a GUI appear? I have no idea.
Can you guys give me some ideas on how to make a system like that, please? Thank you!
You could make a GUI notification in the bottom of the screen appear, or you could make the system send a message in the chat.
Would I need a RemoteEvent from Server to Client?
Yes you would, in order to alert the server that the purchase is complete so it can notify everyone else.
Edit: I read your post wrong
You wouldn’t need a remote event from server to client because you can control the PlayerGui from game.Players.Player.PlayerGui
, and you can send chat messages from the server.
Huh? I thought you need a Local Script to access PlayerGui.
No, you can access PlayerGui from the server.
I just tested this out on a server script:
And when my character loaded, the GUI was visible:
(Ignore the out of context GUI, it was the only GUI I had to hand)
Would this work aswell?
for _, player in pairs (game.Players:GetChildren()) do
local playerGui = player.PlayerGui
end
Yes, that will loop through every player on the server and access their PlayerGui