When any player clicks on the button, it gives all the players the prompt to buy the gamepass, how do I make it so that way only the person who clicks on the button on the SurfaceGUI see’s the prompt.
ServerScript (must be a server script):
Players.PlayerAdded:Connect(function(Player)
for _, BuyGamepasses in pairs(InformationBoardModule.WaterVehicles) do
if BuyGamepasses["ButtonJetskiID"] then
NewInformationBoardGui.WaterVehicles.Buttons.PurchaseJetski.MouseButton1Up:Connect(function()
MarketplaceService:PromptGamePassPurchase(Player, BuyGamepasses.ButtonJetskiID)
end)
end
if BuyGamepasses["ButtonSpeedboatID"] then
NewInformationBoardGui.WaterVehicles.Buttons.PurchaseSpeedboat.MouseButton1Up:Connect(function()
MarketplaceService:PromptGamePassPurchase(Player, BuyGamepasses.ButtonSpeedboatID)
end)
end
end
end)