#need help on gamepass button

1 messages · Page 1 of 1 (latest)

humble adder
tender marlin
#

Can you send a ss of the output and the code

humble adder
#

sure

humble adder
tender marlin
#

Alr so for 1 try doing activated so mobile players csn use it too

humble adder
#

its activated

tender marlin
#

Instesd of mouseclikded*

humble adder
#

1 sec

fickle gazelle
slate valeBOT
#

studio** You are now Level 1! **studio

humble adder
#

but then it calls ss

#

local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 1334077780
local ToolName = "SpeedCoil"

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) then
script[ToolName]:Clone().Parent = player.Backpack
end
end)
end)

fickle gazelle
#

look for these events here

#

this is on the documentation

humble adder
#

like my script is to give the player that buyed the gamepass a speed coil

#

so what prompt should i pick

fickle gazelle
#

the gamepass one, since you're using PromptGamePassPurchase

humble adder
#

yep

fickle gazelle
#

PromptGamePassPurchaseFinished

humble adder
#

ohh ok

#

it doesnt work

fickle gazelle
#
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, gamePassId, isPurchased)
if isPurchased then
  if gamePassId == speedCoilId then
    local coil = CoilModel:Clone()
    coil.Parent = player.Backpack
  end
end
end)

do it like this

humble adder
#

where should i paste that

slate valeBOT
#

studio** You are now Level 3! **studio

fickle gazelle
#

it should be serverscriptservice

humble adder
#

ok lemme try

fickle gazelle
#

anything that you handle in client, will stay on client only

#

localscript is for clients only

humble adder
#

ik

#

doent work

fickle gazelle
#

screenshot your script code in the ssservice

humble adder
fickle gazelle
#

oh that's why

humble adder
#

i gtg

fickle gazelle
#

alright

humble adder
#

see u laterr

#

wait nvm

#

i staying

fickle gazelle
#

local MarketplaceService = game:GetService("MarketplaceService")
local CoilModel = (where is the coil?)
local speedCoilId = (gamepass id of coil)

put this at the very top

humble adder
#

okk

#

the coil is on

#

ServerStorage

fickle gazelle
#

yeah store the coil there

humble adder
#

how can i copy the path

#

im new idk

fickle gazelle
#

basically when you type game.

#

there will be some names appearing right?

humble adder
#

oh

fickle gazelle
#

so when you call something in the serverstorage, you need like game.ServerStorage

humble adder
#

game.serverstorage.SpeedCoil maybe?

fickle gazelle
#

for best practice instead of game.ServerStorage use game:GetService("ServerStorage")

humble adder
#

ok

fickle gazelle
humble adder
#

oh ok i understande it now

#

is this ok?

#

`local MarketplaceService = game:GetService("MarketplaceService")
local CoilModel = (game.ServerStorage.SpeedCoil)
local speedCoilId = (1334077780)

MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, gamePassId, isPurchased)
if isPurchased then
if gamePassId == speedCoilId then
local coil = CoilModel:Cone()
coil.Parent = player.Backpack
end
end
end)`

slate valeBOT
#

studio** You are now Level 2! **studio

humble adder
#

thanks

fickle gazelle
#

does it work now?

humble adder
#

lemme try

#

umm nope

fickle gazelle
#

lemme see the video

#

and also the script

silent tartan
humble adder
fickle gazelle
#

are you sure that is a gamepass?

silent tartan
#

sure

humble adder
#

yes

#

pase = gamepass

fickle gazelle
#

spelled wrong

#

CoilModel:Cone() to CoilModel:Clone()

silent tartan
#

oh bro did clone( )

humble adder
#

oh okk

#

wait

fickle gazelle
#

make sure your output bar is on, so you know if there's an error

#

that will also give you clue on what to fix

humble adder
#

IT WORKS OMG

#

TYSM

fickle gazelle
#

np

humble adder
#

btw the ramp on my left is broken how can i fix it

#

do i anchor it

fickle gazelle
#

tbh I don't have an idea on building so idk how to fix that