Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to call a Function?

function timer()

How do I call a function like:

wait(1)
then
function timer()

But, that wont work sadly.

2 answers

--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.

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")

This discussion is preserved as it was. New answers, comments, and votes are closed.