Question about parameters

ive seen people use in their function parameters something like

function test(x: Number, y: Number)

what i want to know is the name of the thing used to define the parameters aka “: Number”
below is a photo of a example i used for a small script

1 Like

you mean :Frame
it’s for the coder/scripter’s reference, so it,s easier for you to code.

take this scenario where you use frame :Frame
when you call that variable and press : or . you know which function() or attribute related to that specific instance.

i am 90% sure, it doesn’t have any other impact except for code assistance.

1 Like

thank you so much for the help :pray:

1 Like

one more thing to note is, it helps anyone who uses external modulescript (meaning from anonymous people, like something from Roblox toolbox)

Example from easyvisual module


screenshot 1


screenshot2

as you can see in screenshot 1, when I call the method :SetRotation from the modules script, the code assistance points out what data types the module parameter accepts.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.