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

How to make it if a player has a Dev Product, a Part turns visible?

Hello. I'm new to scripting. I'm trying to make a Maze game and I built in the solution a bit above the maze itself. I made it transparent and non collidable, but I want people who bought a specific Dev Product to see that solution. How would I go about this? Thanks in advance.

6 comments

0

This is a help site, not a request one.

0

I'm not asking to be spoon fed the code. I'm asking how to go about it.

0

/\ Youtubemaster is right. We don't give you random script because you ask. You need to try before asking. You didn't try, so if we give you the script immediately, it's not scriptinghelpers anymore but script givers.

0

Hes just asking where to look jeez guys

0

Ey guys its not a script giver site, I get AGWild. Besides we wouldnt give him a whole script. So aAGWild here is how you go about this, make a table with all the players who want the dev product and do a script like if their name is in the table they get a product AND the part turns invisible. So its not really that hard.

0

Like I said : " I'm not asking to be spoon fed the code. I'm asking how to go about it.". That's why I'm going to say, thank you very much Donald_TrumpREAL1238. This was exactly what I was asking: afew pointers on how to go about the scripting. :)

2 answers

There are several nice guides on how to do this on the Developer Wiki such as https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/UserOwnsGamePassAsync

-- in localscript inside playerscripts
local part = game.Workspace.part
local passid = 000000
local marketservice = game:GetService("MarketplaceService")

if marketservice:UserOwnsGamePassAsync(game.Players.LocalPlayer.UserId,passid) then
	part.Transparency = 0
end

script:Destroy() -- to prevent messyness

Also, using google before asking here is a really good habit.

1 comment

0

I did use google. Isn't the UserOwnsGamePassAsync only for gamepasses?

Developer products are not things you own; they are like 1-time micro-transactions. Think buying premium currency.

You would have to either change it to a gamepass, or design a system such that it turns transparent every time you buy the developer product.

1 comment

0

I see. Thank you.

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