#I Try To Do a Backpack Thing But It's Not Working Can Someone Help?

122 messages · Page 1 of 1 (latest)

wispy trenchBOT
#

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

jaunty pendant
#

bagholder script is this

dull canopy
#

Im not a scripter yet but maybe it's bc u have the same thing twice so maybe it should've been "if bullet.Value > bagholder.Value then bagholder.Value = bullet.Value

#

Or bc of the ">" instead of the " ="

jaunty pendant
#

no if bullets value is higher than the bagholder it will be same with the bag value

#

a backpack thing

dull canopy
#

Or maybe

#

(function(plr))

#

U don't have that last one

jaunty pendant
#

not that too its at end

#

end)

dull canopy
#

Kk

#

I was trying to give some ideas maybe you'd find it😁

jaunty pendant
#

thank you :)

dull canopy
#

Bc as sais im not a scripter yet😅😭

jaunty pendant
#

i added while true() do but its not even working too

dull canopy
#

Np💖

jaunty pendant
dull canopy
#

💖

hollow scroll
#

Any syntax

jaunty pendant
#

wait lemme check

#

theres no syntax i can see

hollow scroll
#

Show me bullets

wispy trenchBOT
#

studio** You are now Level 4! **studio

jaunty pendant
#

wait what do u mean by syntax

#

oh

hollow scroll
#

Syntax errors

jaunty pendant
#

ok i dont see any and

#

bullets is a leaderstat

hollow scroll
#

So if bullets exceeds 10

#

It gets set back to 10

jaunty pendant
#

yes

hollow scroll
#

What is happening instead

jaunty pendant
#

its not gets set back to 10

#

when i shoot with a pistol

hollow scroll
#

Ok show me bullets script

jaunty pendant
#

and

jaunty pendant
hollow scroll
#

Uhh

#

What is boost

#

Also

jaunty pendant
#

its like x2 of bullet

wispy trenchBOT
#

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

hollow scroll
#

Is the 10 being set before the +1 is added

#

For bullets

dull canopy
#

Btw u aaid at first bullet.Value > bagholder.Value then why did u say "then bullet.Value = bagholder.Value"?

hollow scroll
#

10 script should be after that

jaunty pendant
#

how to make it to be after that

hollow scroll
#

Move the code to be below it

hollow scroll
#

The thread will go through and run that after so that it actually goes back down

jaunty pendant
#

its a tool

hollow scroll
#

The code in the script itself

#

Copy it and paste it below that

jaunty pendant
#

its like that

dull canopy
# jaunty pendant wdym

It says first that bagholders value is more than the bullets but then it says its equal

jaunty pendant
hollow scroll
#

Paste the full script in here

hollow scroll
#

The contents of the script

jaunty pendant
hollow scroll
#

Not it in workspace

#

I will show you what I mean

jaunty pendant
#

ok

hollow scroll
#

U gonna paste it

jaunty pendant
#

to where

hollow scroll
#

This chat bruh

jaunty pendant
#

oh

#

local plr = game:GetService("Players")
local player = plr.LocalPlayer
local boost = script.Parent.Boost

script.Parent.Activated:Connect(function()
player.leaderstats.Bullets.Value = player.leaderstats.Bullets.Value + 1 + boost.Value
script.Enabled = false
wait(1)
script.Enabled = true
end)

hollow scroll
#

No like the full script

#

And format it

#

With '''

jaunty pendant
#

how man

hollow scroll
#

Oh bruh

jaunty pendant
#

i cant understand that

hollow scroll
#

You have them all as seperate

jaunty pendant
#

yes

hollow scroll
#

U should combine them into one script

jaunty pendant
#

and send here

hollow scroll
#

Just put the part where it sets the bullets to 10

#

Under the part where it adds bullet when you shoot

#

I can think of a way to just edit the bullet adding script that might fix it as well if that doesn't

jaunty pendant
#

doing that wait a min

#

i did it now testing

#

it didnt worked

hollow scroll
#

Ok

#

No syntax errors either?

jaunty pendant
#

wait i will check

hollow scroll
#

That should be the first thing you look at always

jaunty pendant
#

no

hollow scroll
#

It's how to know if things don't work

#

But yea

jaunty pendant
#

it didnt worked

#

i mean no by this

hollow scroll
#

U can just scrap the whole bag holder script and add it to the addition thing

#

If player.leaderstats.Bullets.Value < 10 then
Player.leaderstats.Bullets.Value = player.leaderstats.bullets.value + 1

#

If it's 10 then this will not run

jaunty pendant
#

but i need to make a bag value bcs i will make a shop to buy bag

hollow scroll
#

If not work idk I'm dumb

jaunty pendant
#

but letme check

#

this

#

it didnt worked too

#

man it says bullets is not valid

#

it just goes 10 fast

#

ig the tool just makes the error

wispy trenchBOT
#

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

hollow scroll
#

Alr maybe someone else can help

#

I'm done for

jaunty pendant
#

ty man

jaunty pendant
#

nvm i figured it ouy

hollow scroll
jaunty pendant
#

i just added a disable thing to tool

#

like that

hollow scroll
#

Hm ok

jaunty pendant
hollow scroll
#

Haven't played around with tools too much

jaunty pendant
#

oh ok

hollow scroll
#

Nice job

jaunty pendant
#

thx for ur help