Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a gamepass spawn a brick? [closed]

Asked by 3 years ago
Edited 3 years ago

I'm quite new 2 scripting and I want to make it so when a player buys a gamepass a brick spawns. Does anyone know how I chould do that? If you know any tutorials about it that whould be a help ore just write down an answer please.

Closed as Not Constructive by Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 3 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

Its very simple, here is a code block;

local Marketplace = game:GetService("MarketplaceService")

if Marketplace:PlayerOwnsAsset(--your value--)  then
local Part = Instance.new("Part")
Part.Parent = workspace
end

You can make it anchored two if u want. how to do that is to do this code snippet;

Part.Anchored = true

You can copy the code if u want

Ad