#ServerScriptService

81 messages · Page 1 of 1 (latest)

olive stirrup
#

Cant find the issue

somber roost
#

script may not be loaded in yet

olive stirrup
#

Where do I add that? @somber roost

#

Sorry I'm very new

somber roost
#

ServerScriptService:WaitForChild("MainServer")

#

instead of

#

ServerScriptService.MainServer

olive stirrup
#

Like this?

somber roost
#

Yeah just remember to add .PlayerData.Manager

olive stirrup
#

Is it fixed or do i need to do something?

winged ravineBOT
#

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

olive stirrup
#

@somber roost Not sure what WaitForChild does, is it supposed to print something?

somber roost
quick ravine
#

waits for it to load in before running the rest of the script

somber roost
#

uh

#

yeah that

#

the .PlayerData.Template should be AFTER the function

#

like

#

ServerScriptService:WaitForChild("MainServer").PlayerData.Template

olive stirrup
#

OK, I changed it now, what am i looking for now?

somber roost
#

Try it

#

Basically we are waiting for the script "MainServer" to load before continuing

olive stirrup
#

So its another way of calling the template?

somber roost
#

Yes

olive stirrup
#

Ah ok, ill test it out and see if it works correctly

somber roost
#

alr lmk

olive stirrup
#

It works so far, @somber roost tysm! Will let you know, trying next part of the script

olive stirrup
#

@somber roost Not really related but noticed another thing not working

#

CPS not showing,

quick ravine
#

i thought this was a cookie clicker game for a sec😭

#

i see too many

olive stirrup
#

hahaha, trying to make something completley new but with clicking sim functionalitys added

#

cant find the issue though

quick ravine
#

no errors in output?

somber roost
olive stirrup
#

nope

somber roost
#

to see if it runs

olive stirrup
#

Tried adding this:

#

Nothing prints

somber roost
#

the function isnt being called

#

or it might be that the if amountOfClciks <= 0 always return

#

try putting a print at the start of the functiion instead

olive stirrup
winged ravineBOT
#

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

olive stirrup
#

Still not printing

quick ravine
#

yes need to call function

somber roost
#

yeah

#

check the part where the function is called

olive stirrup
somber roost
#

and is THAT function called?

#

try printing something in it

olive stirrup
#

Getting this error:
02:58:29.010 Players.MiyokoDev.PlayerGui.Currency.Manager:20: attempt to perform arithmetic (sub) on string and number - Client - Manager:20

somber roost
#

try tonumber(amount)

#

might be that its a string

olive stirrup
#

Like this? @somber roost

somber roost
olive stirrup
#

Same "Players.MiyokoDev.PlayerGui.Currency.Manager:20: attempt to perform arithmetic (sub) on nil and number"

somber roost
#

wait

olive stirrup
#

PreviousClicksAmount?

somber roost
#

what line is 20?

#

the error is on line 20

olive stirrup
#

local amountOfClicks = amount - PreviousClicksAmount

somber roost
#

then yeah

#

ohh

#

on nil and number

#

one of those is nil

#

probably amount

#

can you do print(amount)

olive stirrup
#

Where do you want it on line 21?

somber roost
olive stirrup