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

How do I make a gamepass spawn a brick?

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.

1 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

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