#whats wrong with this

27 messages · Page 1 of 1 (latest)

honest bramble
#

local MarketplaceService = game:GetService("MarketplaceService")
local gamePassId = 683051870

db = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if db == false then
db = true
if purchasedGamePassId == gamePassId then
player.leaderstats.Deaths.Value = player.leaderstats.Deaths.Value + 4
if not then
player.leaderstats.Deaths.Value = player.leaderstats.Deaths.Value + 2

                wait(3)
                db = false
            end
        end
    end
end

end)

restive nexus
#

errors? the issue? anything at all?

#

😭

civic coral
#

Its just a test lol

#

Our exam

honest bramble
#

the gamepass wont work

#

it just does plus 2

#

not plus 4

restive nexus
#

purchasedGamePassId is not specified in the script

#

yet its still there

civic coral
#

I dont see any place where ‘purchasedGamePassId’ is defined

restive nexus
#

go figure that

honest bramble
#

huh.

civic coral
#

what you tryna do?

honest bramble
#

make the gamepass give double

civic coral
#

Also there is a line that say ‘if not then’ which is not how that works. Instead use ‘else’

honest bramble
#

o

civic coral
honest bramble
#

ngl i have no idea wtf im doing

#

😭 this shi hard bro

restive nexus
#
local MarketplaceService = game:GetService("MarketplaceService")
local gamePassId = 683051870

db = false
script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        if db == false then
            db = true
            local gamepassOwned = MarketplaceService:UserOwnsGamePassAsync(player.UserId,gamePassId)
            if gamepassOwned then
                player.leaderstats.Deaths.Value = player.leaderstats.Deaths.Value + 4
            else
                player.leaderstats.Deaths.Value = player.leaderstats.Deaths.Value + 2
            end
            wait(3)
            db = false
        end
    end
end)
#

fixed code

#

@honest bramble

honest bramble
#

bros a genius

lapis terraceBOT
#

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

honest bramble
#

smartest man alive

honest bramble
#

i got another problemo