So, I’m making a purchase button to make a frame show that normal players who haven’t bought the gamepass cant see the output says nothing and here is the codes:
Gamepass Handler code:
game.ReplicatedStorage.GamePassNeed.Gui.OnClientEvent:Connect(function(plr)
local clonebutton = game.ReplicatedStorage.GamePassNeed.ShowButton:Clone()
clonebutton.Parent = script.Parent
end)
that script is located in a gui named MainGui
This next script is located in the button its self the buttons name is PurchaseButton
local plr = game.Players.LocalPlayer
local gamepassId = 80416384
and seems like you used OnClientEvent(player) and that makes no sense, i suggest you to learn basics of scripting, before making games, you can search in the internet about RemoteEvents and MarketPlaceService