I am trying to solve this error.
Workspace.Teleport1A.TeleportScript1A:15: ambiguous syntax (function call x new statement) near '('
You did not post a script but I see your issue.
You are probably doing something like this:
(this is just an example) ```lua local num = 7/(2 + 1.5)
(function() --// ... end)() ```
Lua does not know if you are trying to call 3.5
, a number value. Or if line 3 is a new statement. Since it is in parenthesis and a number literal it allows you to do this:
(3.5)()
Which causes the error of "attempt to call a number value"
What you can do is remove any parenthesis, or use a semicolon to separate it, like so:
```lua local num = 7/2 + 1.5 --// yes order of operations gets messed up, but you no longer get error
(function()
end)() ```
Or using a semicolon:
```lua
local num = 7/(2 + 1.5); --// No error and (2 + 1.5) has higher priority since in parenthesis !!!!! :DDDDD
(function()
end)() ```
Closed as Non-Descriptive by DeceptiveCaster, User#24403, and RubenKan
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?