local frame = game.StarterGui.Radio.Frame local input = frame.Input local play = frame.Play local stop = frame.Stop local gamepassId = 8088654 local players = game:GetService("Players") -- the player service local marketService = game:GetService("MarketplaceService") local player = players.LocalPlayer -- In client sided code, you use players.LocalPlayer to get the player script.Parent.MouseButton1Click:Connect(function() -- UserOwnsGamePassAsync takes the UserId as parameter instead of the player instance like previously if(marketService:UserOwnsGamePassAsync(player.UserId, gamepassId) then frame.Visible = true play.Selectable = true stop.Selectable = true input.Selectable = true -- do your thing else print("Pass not found") end end end)
This script is supposed to put a personal radio GUI on the screen if you have a game pass. It's supposed to make the radio's frame turn visible and the buttons turn visible and selectable when the player has the game pass. It should be relatively simple.
As far as I could tell, I set it up correctly. An error occurs under "then" when I try to run it. Does anybody know how to patch it?
I have asked a question similar to this before, see if you can get any help from this.
The answer is called a Typo....
At line 16 after if you put a Bracket if(...
.
Simply Remove the bracket and its fixed!