This bug is really annoying and I don’t know how to fix it…?
Take a look here, I try to write a function but it’s name is underlined (unknown), why?
Please help it’s getting in my nerves
This bug is really annoying and I don’t know how to fix it…?
Take a look here, I try to write a function but it’s name is underlined (unknown), why?
Please help it’s getting in my nerves
Maybe there is an error in your script so it underlined Test?
i think this is because ur using this function inside if statement or another function, try making it local function Test() that should work
I’ll check real quick. Because yes I do have tons of lines
But the “local” will make it on the client right?
You can create functions inside of an if statement it wouldn’t error
if 1 + 1 == 2 then
function Test()
print("Bacon")
end
end
Also local functions are meant for a certain part of a script for example:
if 1 + 1 == 2 then
local Test = function()
print("Bacon")
end
Test()
end
Test() -- Doesn't work, because it's not a global function
if 1 + 1 == 2 then
Test = function()
print("Bacon")
end
Test()
end
Test() -- does work because it's a global function
ik u can do that but sometimes it says u should make it local function for some reason this happens a lot to me
Just checked everything, seems like the script is correct
Are you positive, if so could you send your code?
hover over the red line with your mouse then screenshot what it says
Yep as i told u change it to local function
edit: btw this red line is not gonna effect or error ur code
Yeah ik but I wanted to make the line it a bit shorter
Oh okay so basically, this:
local function Test()
print(“Test”)
end
is the same as this?
function Test()
print(“Test”)
end