#Responding nil
1 messages · Page 1 of 1 (latest)
because when you load the game the player takes a few moments to load while the script runs imidiatly
do i use wait for child or smt?
depends what you want to do with the script
so im practicing with basics so i can eventully learn save data like the back of my hand instead of relying on videos
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)
its prob nil
yea his function is called PlayerAdded tho
it is because he didnt pass a parameter
oh yeah thats what i wouldve done
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")`
so what does that do if i may ask
PlayedAdded is an event of the Players service. It lets you run something when a player joins the game.
-- Get the Players service:
local Players = game:GetService("Players")
-- Connect a callback function to the PlayerAdded event:
Players.PlayedAdded:Connect(function (player)
-- PlayerAdded automatically pass the player who joined as the first argument
end)
its a parameter
calculators dont know what numbers your adding without the numbers
so the parameter takes varibles into functions to be recognized?
yes
ohh
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
ahhh i see
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
only if you call the function with 2 numbers
is this built into discord?
or the sever
Discord, its just markdown :P
thats cool!
yes colors