generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Make A GUI That Only Appears For Gamepass Owners?

Previous Thread :: Next Thread 
iiKamii is not online. iiKamii
Joined: 31 Dec 2012
Total Posts: 48
10 Sep 2014 02:30 PM
Is this possible? How?
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
10 Sep 2014 02:32 PM
playeradded event
check if player has the gamepass
clone gui from somewhere into player's startergui.

tada
Report Abuse
ModDeathRally9 is not online. ModDeathRally9
Joined: 02 Sep 2012
Total Posts: 370
10 Sep 2014 02:33 PM
game.Players.PlayerAdded:connect(function(plr)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, 1286847) then
game.ServerStorage.Gui:Clone().Parent = plr.PlayerGui
end
end)
put the id as the pass id and game.ServerStorage with the location of the gui.
Report Abuse
iiKamii is not online. iiKamii
Joined: 31 Dec 2012
Total Posts: 48
10 Sep 2014 03:08 PM
@Mod

Thank youu, it works. ~ <333

But the gui disappears once they player resets? How do i make it stay?
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
10 Sep 2014 03:12 PM
clone it into their startergui and playergui.
Report Abuse
iiKamii is not online. iiKamii
Joined: 31 Dec 2012
Total Posts: 48
10 Sep 2014 03:15 PM
@VerifiedName

Like this? :

game.Players.PlayerAdded:connect(function(plr)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, 1286847) then
game.ServerStorage.Gui:Clone().Parent = plr.PlayerGui
game.ServerStorage.Gui:Clone().Parent = plr.StarterGui
end
end)
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
10 Sep 2014 03:19 PM
i just remembered that player's dont have starterguis so no actually lol, try this

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, 1286847) then
game.ServerStorage.Gui:Clone().Parent = plr.PlayerGui
end
end)
end)
Report Abuse
iiKamii is not online. iiKamii
Joined: 31 Dec 2012
Total Posts: 48
10 Sep 2014 03:47 PM
@Verf

That didn't work. :[
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
10 Sep 2014 03:59 PM
Just add a local script in the startergui and add:

player = game.Players.LocalPlayer
if player.Name == "yourname" then
player.PlayerGui.yourguiname.Visible = true
end

Make sure you have the gui's visible set in false, this may be crappy but i use this for now since I don't know any other way yet lol.
Report Abuse
iiKamii is not online. iiKamii
Joined: 31 Dec 2012
Total Posts: 48
10 Sep 2014 05:16 PM
@Roblox

I want this to work on everyone who buys the game pass, not just me?
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
10 Sep 2014 05:22 PM
OHHHHHHHHHHHHH, i read wrong.
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
10 Sep 2014 05:24 PM
Just do what I did but put what ModDeathRally9s said.


StarterGui>LocalScript

player = game.Players.LocalPlayer
if (what ModDeathRally9 said) then
--what his post was but don't include the playeradded event
end
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
10 Sep 2014 05:26 PM
plr = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, 1286847) then
game.ServerStorage.Gui:Clone().Parent = plr.PlayerGui
end

Try this
Report Abuse
iiKamii is not online. iiKamii
Joined: 31 Dec 2012
Total Posts: 48
10 Sep 2014 05:57 PM
@Roblox

Now it doesn't even give me the GUI. :/
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
10 Sep 2014 09:38 PM
If it doesn't work then do something with "Game:GetService("GamePassService"):PlayerHasPass(player, id)"
and replace it from the other one that finds the asset. I can't really help out that much since I have to sleep :/ hopefully someone can help out. Oh btw id = your id of the game pass of course :P so yeah
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image