Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I change text on a part on every player screen based on if they have a gamepass?

I would like the text to be different on all players that have the VIP gamepass. I am using a Remote Event to tell if the player has the gamepass. LocalScript:

local text = script.Parent.Text.Description
local event = game.ReplicatedStorage.hasVipGamepass
event.OnClientEvent:Connect(function (plr)
        text.Text = "Complete the obby to earn 10 coins!"
end)

And here is my server script:

local MPS = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local event = game.ReplicatedStorage.hasVipGamepass
Players.PlayerAdded:Connect(function (plr)
    if MPS:UserOwnsGamePassAsync(plr.UserId,10871775) then
        event:FireClient(plr)
    end
end)

1 comment

0

you don't have to use multiple scripts, it will only change for the player gui not for the starter gui

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.