#topbar+ gamepass needed to use
1 messages · Page 1 of 1 (latest)
i lowk dont know what to do
im assuming something like require:gamepass(2391239123) or soemthing but ionknow topbar
:UserOwnsGamepassAsync(Player.UserId, GamepassId)
** You are now Level 2! **
game:GetService("MarketplaceService")
you must've not defined it then
yes
for topbar+
local localPlayer = game:GetService("Players").LocalPlayer
does this work
then
local player = game.Players.LocalPlayer
ok
with local
btw you're supposed to say it like this:
game:GetService("MarketplaceService"):UserOwnsGamepassAsync(Player.UserId, GamepassId)
one big line
meh
how about you find out
okay maybe tell us what you're tryna do and what's happening so I get the full picture
hi, i want to check at the end of the game if the player has a gamepass (that doubles the coins that the player gets) and double the coins he gets if he owns the gamepass if outcome == "time-up" then for i, c in pairs(game.Players:GetPlayers()) do if c:FindFirstChild("Contestant") then local player = c player.Tokens.Value = play...
so i have a character selection
and i want you to need a gamepass for some characters
and the topbar is my character selectino rn
and i want some of the topbar buttons to only work with gamepass
I am more concerned about how the hell did this happen
yeah idk i checked output
maybe it's not loading in time? so maybe if you split it like this it'll work
local marketPlaceService = game:GetService("MarketplaceService")
marketPlaceService:UserOwnsGamePassAsync(Player.UserId, GAMEPASS_ID)
BRO
YOU MADE A TYPO
you said :UserOwnsGamepassAsync(Player.UserId, GamepassId)
instead of
:UserOwnsGamePassAsync(Player.UserId, GamepassId)
so @thin orbit try this instead
ok i tried what you did
lemme sohw u soemthing
it still fires the event
either way if i own it or not
btw why are you using ContextActionService for this? why not just check if the guy clicked on a button
im not idk how to do that im jsut using topbar+
idk how to use both of those together so this is jsut easier for me
there's no cas anywhere in here, topbarplus is a custom module you can get it from google or from toolbox, pretty decent module
that what i thought
but ineed this button in my thing to only fire event if someone owns a gamepass pyro
i'd be more helpful but you've probably never read a docs page in your life and this has basically devolved into code begging and do-it-for-you which i don't want to be part of
oh I thought :bindEvent was used in cas tho
also it's a monetization feature and those come at a premium
i'm mostly just watching how ob3e do.
;p
😭
** You are now Level 3! **
I am gonna be honest I've never seen :bindEvent used outside of cas
its like like like
i just tryna figure out this one thing here
ive never asked for any help on this before
I am not familiar with using events the way you do so I don't think I can really help
yeah like @olive kindle
yeah like pyro-fire
im not a code begger i just have problem with topbar idk how to use it
fully
you've directly copy+pasted other peoples code and are now stuck on a missing if statement.
bro all it is is topbar+
try looking stuff up in the docs once in a while https://create.roblox.com/docs/reference/engine/classes/MarketplaceService#UserOwnsGamePassAsync or making attempt to learn how to code https://create.roblox.com/docs/tutorials/fundamentals/coding-1/coding-fundamentals or y'know google, ai, etc, all decent options
bro dipped 💀
i dont like where-do-i-put-that kinds of "help" :/
I thought topbarPlus was dead ass a button in his game or something lol
they took the function call that checks, and failed to turn it into a condition. nothing to do with topbar+ at that point lol
yeah it's just a textbutton
so bro doesn't know how to use a module that does everything for him crazy
it has a few fancies to give it icons and position and styles and such, but textbutton.Activated is the same as bindEvent("selected",...)
ye bro doesn't know how to make a textbutton do an if statement
so he had to check if the button was clicked right
that's the bindevent
only needs to check the gamepass, using the function you gave
and put it in an if statement
like, that's it
lol
so basically if the userOwnsGamePass thing returned true
then fire event, yeah.
imagine bro looking back at this and jumping off his chair
probably still asking where do i put that?
another classic case of can't expect results if you don't put in the work
anyway we should probably leave this thread alone now
yeaa it's not the most productive thing, not always the most helpful, which is why i didn't want to say anything because i'm not going to be of help, but it does pain me to see people getting run through the ringer of "i just need help with this ONE thing!" and then waste hours on an if statement and spoonfeeding them code.
over a monetization feature no less - like cmon you setting up payments without offering any of that pay in exchange? that just doesn't sit right with me 🤷
also really, if you're getting stuck on an if statement, always makes me curious how they manage to get these games that could justify adding monetization in the first place
basically just making a game without knowing shit about how to make games
looks like a battlegrounds clone too, because of course it is
I ran into a similar thing today was telling the guy you need to use a for loop and then he said "what's that"
they got their hands on a leaked clone, or maybe bought it for $5, and now they want to add gamepass and compete with tsb when they can't handle an if statement
it really is an enigma
yeah, i've seen so many conversations devolve into whats that, how do i use it, where do i put that, rinse repeat
as a technique for actual development, idk man, some people get by on that. heck, that's probably how deadrails was made
well, to start with
like dude wasn't familiar WITH SHIT I had to painfully tell him exactly what to do but then ended up just modifying it myself in studio lol
yeah that's how it tends to go
I mean deadrails is fun that's all that matters in my opinion
give very basic instruction, still no clue, so you simply do it for them
seen that time and time again and every time it makes baby jesus cry 😢
I mean they probably didn't know how to get better the right way so they cheaped out
even worse is after giving them free working code is they say thanks for nothing, or not even thank at all, or "i did it!"
i seen all 3 many times
yeah they don't know the value of what they're getting because they haven't tried themselves
another fun one is "but it's only 2 lines!"
the two lines are probably 80 characters each lol
nevermind the hours, days, weeks you can spend tracking down exactly which line to change and what to change it to, "it's only one line!"
na, the worst i've seen is 2 closures one with a missing end, and another with an extra end. literally only one line needed to move. that took me like 2 weeks to fix coz the code somehow worked just fine except for some niche buggy behavior that didn't happen often, or happened randomly
I always try to figure out why something that I don't want to happen, happens. perhaps too much
point is around 70~80% of code work is reading code and docs and planning things out, not writing new lines or changing existing lines.
"it's only one line!"
yeah because you come back the next day and you're like what was that one bug I was fixing yesterday again?
yeah that takes a while too
i suppose can't be too harsh though, gotta keep in mind fair number of people are gamers who are looking into game dev, and roblox makes it look super easy, barely an inconvenience
in reality it's very hard
yup