#Trying to make range for yen earning on kill

36 messages · Page 1 of 1 (latest)

wise latch
#

you can get a random number through math.random

#

math.random(6, 12)

#

multiplication

#

no

#

cant multiply a number with a string

candid ferry
#

where is wave defined

#

lol

#

make a variable for the wave

local wave =

set it equal to whatever the current wave is

#

if it's in a different script than the one that handles waves you could make a value somewhere that updates based on whatever the current wave is

#

make a numbervalue in replicated storage and call it "Wave", then in the for wave=1,15 do loop change ReplicatedStorage.Wave.Value to wave

#

then in the other script define wave by doing

local wave = ReplicatedStorage.Wave.Value
#

it's already there

#

in the wave script

#

oh wait

#

uh

#

just right after the for wave=1,15

#

where you set Currentwave = wave

#

put it there

#

no

#

?

#

no

#

😭

#

do

#
game:GetService("ReplicatedStorage").Wave.Value = wave
#

then in your other script do

#

yes

#

then in the other script do

local wave = game:GetService("ReplicatedStorage").Wave.Value
#

move it to line 39

candid ferry
#

where you make the wave variable

#

yeah

pearl tuskBOT
#

studio** You are now Level 10! **studio

candid ferry
#

then change line 41 to

player.Yen.Value += math.random(6,12) * wave
#

you did make the numbervalue correct?

#

okay then it should work

pearl tuskBOT
#

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