Hello, Im pretty new to scripting, so Im just confused about the differences between "end" and "end)".
In Lua, there is no end). end and ) are two different things. ) is used to close something when it is opened with (. For example:
local func = function() print("hello") end string.dump(func)
This is the same as:
string.dump(function() print("hello") end)
Only difference is that the function has a ( before it starts. So you have to end the function with ). Hopefully this helped!
end is used to wrap up if statements, loops, etc.
What end) does is ends :Connect()
script.Parent.Touched:Connect(function()
there is one parenthesis missing here, so you must include it when you say end. This will make it end)
end wraps something up when there is not a parenthesis missing, while end) is used when you need an extra parenthesis, like in the :Connect()
example.
Locked by JesseSong
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?