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

How to call a Function?

Asked by
Rurith 10
10 years ago
function timer()

How do I call a function like:

wait(1)
then
function timer()

But, that wont work sadly.

2 answers

Log in to vote
1
Answered by 10 years ago
--Here's the answer

function timer()
    --Instert ANY code here
end

timer() --Calls the function

--To learn more about ROBLOX Lua programming, watch ROBLOX Scripting Tutorials on YouTube, by Peasfactory.
Ad
Log in to vote
0
Answered by 10 years ago

Heres one of my fav functions to use, maybe it'll help;

function oc(msg,time,par,type)
m=Instance.new(type)
m.Text=msg
m.Parent=par
wait(time)
if m~=nil then
m:remove()
end end

oc("Text",2,workspace,"Hint")

Answer this question