#leaderboards

69 messages · Page 1 of 1 (latest)

merry ermine
#

just google

#

when you add the leaderstats you can add to it using
leaderstats.Speed.Value += 1

fossil ridge
#

ok ty

fossil ridge
merry ermine
#

tutorial how to make a loop

#

"Making the Script Wait" is the section you want

#

you basically need to use wait(1) or task.wait(1) to wait a second in a loop

#

and in the loop you can use for loops to loop thru players and add coins to their leaderstats

#

the for loop for players isn't documented so let me show you how to do it

fossil ridge
#

no so basically my game is where every second your speed increases +1 im tryna figure out how to make the leaderboard add +1 speed every time the players speed increases

merry ermine
merry ermine
fossil ridge
#

the speed increase script?

merry ermine
fossil ridge
merry ermine
#
player:WaitForChild("leaderstats").speed.Value = currentSpeed
fossil ridge
merry ermine
#

no

#

in the while loop

#

you could also do math.floor(currentSpeed)

#

instead of just currentSpeed

fossil ridge
#

im new to scripting how do i do that

merry ermine
#
player:WaitForChild("leaderstats").speed.Value = math.floor(currentSpeed)
fossil ridge
#

where does it go im so confused sorry

merry ermine
#

under currentSpeed = currentSpeed + speedIncrease

fossil ridge
#

ohh ok

#

like this?

#

@merry ermine

merry ermine
#

yes but without the Z on the end

fossil ridge
#

oh yea ok now what do i do?

merry ermine
#

that's all

fossil ridge
#

do i adjust my leaderboard script or smth

#

cus i cant see anything in the game

merry ermine
fossil ridge
merry ermine
#

and what kind of script is it?

fossil ridge
#

the leaderboard script

merry ermine
#

no i mean

#

LocalScript / Script / ModuleScript

#

and is it in ServerScriptService

fossil ridge
#

yea its in serverscriptservice

#

and its a normal script

merry ermine
fossil ridge
#

is that why it aint working

merry ermine
#

probably not but still that's a mistake

fossil ridge
#

it was lol

#

but anyway the leaderboard aint updating when my speed increases

merry ermine
fossil ridge
#

ye

lofty mesaBOT
#

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

merry ermine
#

any errors in the output?

fossil ridge
merry ermine
#

is there no error about the script?

fossil ridge
#

not sure can you double check

#

this is the leaderboard one

#

and the two speed increase scripts

fossil ridge
#

@merry ermine

merry ermine
#

idk