#ServerScriptService
81 messages · Page 1 of 1 (latest)
try :WaitForChild()
script may not be loaded in yet
ServerScriptService:WaitForChild("MainServer")
instead of
ServerScriptService.MainServer
Like this?
Yeah just remember to add .PlayerData.Manager
** You are now Level 1! **
@somber roost Not sure what WaitForChild does, is it supposed to print something?
:WaitForChild() yields until the child exists
waits for it to load in before running the rest of the script
uh
yeah that
the .PlayerData.Template should be AFTER the function
like
ServerScriptService:WaitForChild("MainServer").PlayerData.Template
OK, I changed it now, what am i looking for now?
It should work now
Try it
Basically we are waiting for the script "MainServer" to load before continuing
So its another way of calling the template?
Yes
Ah ok, ill test it out and see if it works correctly
alr lmk
It works so far, @somber roost tysm! Will let you know, trying next part of the script
alr nice!
@somber roost Not really related but noticed another thing not working
CPS not showing,
hahaha, trying to make something completley new but with clicking sim functionalitys added
cant find the issue though
no errors in output?
print something in the updateclickspersecond function
nope
to see if it runs
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
** You are now Level 2! **
Still not printing
yes need to call function
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
Here:
Like this? @somber roost
yep
Same "Players.MiyokoDev.PlayerGui.Currency.Manager:20: attempt to perform arithmetic (sub) on nil and number"
then the other one is a string
wait
PreviousClicksAmount?
local amountOfClicks = amount - PreviousClicksAmount
then yeah
ohh
on nil and number
one of those is nil
probably amount
can you do print(amount)
Where do you want it on line 21?
on the line before 20
I’m off to bed will try tomorrow and get back to yoy!