Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I dont understand what parameters are, can someone explain what parameters are?

Asked by 2 years ago

Roblox defines parameters as, "Parameters are definitions of what a function expects to receive when it’s called." I don't understand this, what does that mean?

2 answers

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago
local function Combine(V1,V2)
    local V3 = V1 + V2
    print(V3)
end

Combine(3,2)

Ehm i think parameters is for example Parameter is Combine(3, 2)

Ad
Log in to vote
0
Answered by 2 years ago

Parameters are, well, what roblox said. But here's an example.

game.Workspace.Part.Touched:Connect(function(thethingthattouched)
    print(thethingthattouched)
end)

So, the parameter here is "thethingthattouched". You can name it whatever you want, but it will mean what caused the function. So, in this script here, whatever touches the part will be thethingthattouched. I hope this makes sense.

Answer this question