#Script works... half the time?

1 messages · Page 1 of 1 (latest)

calm sparrow
#

(unsolved) So i made this script here to make leaderstats but it only works half the time?

cinder fern
#

Idk but do Instance.new("ValueObject", parent).Name = "ValueName"

hushed pewter
cinder fern
#

Is same efficient, and its just a exemple

hushed pewter
#

Anyways, this just looks like a text book race condition. Guessing that this script is not in SSS and not fully compiling before the player joins in

calm sparrow
#

im not too sure how i would fix that

hushed pewter
calm sparrow
#

SSS

hushed pewter
#

It’s just a server script right?

calm sparrow
#

its a normal script

#

should i delete that and transfer it to a server script

#

wait nvm

#

idk what i was thinking abt jeez

hushed pewter
#

Odd, it’s rare to see sss compiling take longer than players joining

calm sparrow
#

is my game too unoptimized?

#

other thing is

#

it works for 1 stat

#

it works on wins everytime

hushed pewter
#

Hell, you could run a quick debug to even test if it is a race cond. just print Players:GetPlayers before the bottom line in the ss

calm sparrow
#

but not always coins

hushed pewter
hushed pewter
calm sparrow
#

ok so its not a race or anything

#

i dont think

#

it prints the message

#

but doesnt load coins

hushed pewter
#

So wins works every time but coins doesn’t? That just sounds like it should’ve thrown an error then

calm sparrow
#

i do have a few errors i need to fix but theres nothing regarding that script

#

there all gui infinite stacks

#

which wouldnt effect it

#

i mean ive been debugging this for like 20mins

#

which isnt too long

#

but it seems like such a simple script and i have no clue why it isnt working

#

well its working now

nimble oakBOT
#

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

calm sparrow
#

i dont think i even did anything

#

nvm

#

its broken again

#

this is actually so weird

fleet palm
#

very inportant question.

#

is this on a local?

calm sparrow
#

It shouldn’t be, correct?

#

@fleet palm

somber hatch
#

Its fine tho

#

Are you putting leaderstats script in serverscriptservice?

fervent delta
#

i also just attempted and worked

thorn juniper