#Responding nil

1 messages · Page 1 of 1 (latest)

oak phoenix
#

so im testing stuff and trying to simply access playerdata (as in the name, Instances such as leaderstat folders, and changing the values in it) and im having problems if you would be so kind as in to help me that be amazing
btw it says name is nil i promise my isnt nil

jade crater
#

because when you load the game the player takes a few moments to load while the script runs imidiatly

oak phoenix
#

do i use wait for child or smt?

jade crater
#

depends what you want to do with the script

oak phoenix
#

so im practicing with basics so i can eventully learn save data like the back of my hand instead of relying on videos

jade crater
#

ah

#

oh

#

wait

#

I see the error actually

#

playerAdded has a parameter that your not putting in

#

ur doing

PlayerAdded()

and not

PlayerAdded(Players:GetPlayers)
teal lake
#

its prob nil

jade crater
#

yea his function is called PlayerAdded tho

jade crater
teal lake
reef furnace
#

Read the documentation link I sent. Also it doesn't matter what a function is named, that doesn't determine it's functionality.

local function WaitForChild(name)
  print(name)
end
WaitForChild("Part") --> This doesn't behave like `Instance:WaitForChild("Part")`
oak phoenix
reef furnace
teal lake
#

calculators dont know what numbers your adding without the numbers

oak phoenix
#

so the parameter takes varibles into functions to be recognized?

teal lake
#

yes

oak phoenix
#

ohh

teal lake
#
function add(a , b)
  -- yes i see a and b
  return a + b
end
-- what is a and b
add() -> what the fuck am i adding
add(1,2) -> yes its 3
oak phoenix
#

ahhh i see

teal lake
#

those parameters can only be seen in that function

#

called a scope

#

i think

jade crater
#

sorry for not replying I was bus

#

busy

oak phoenix
#

its fine

#

i dont know how to make that format but if i do this will it work

function add(a , b)
if a + b == 2 do
print("Correct")
end()

#

end

jade crater
#

only if you call the function with 2 numbers

oak phoenix
#

or the sever

reef furnace
#

Discord, its just markdown :P

oak phoenix
#

thats cool!

jade crater
#

yes

#

it is

teal lake