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

How can I connect a countdown GUI to a script in the workspace?

Asked by 9 years ago

So say I have a basic countdown script within a GUI

function countDown()
local Time = script.Parent
for i = 30, 0, -1 do
Time.Text = i 
wait(1)
end
end

So I've tried to make it into a global function, and it works in test mode, however it doesn't work in a server. I've been told you can only use global functions within the same client. So then how would I connect this to a script in the workspace?

1 answer

Log in to vote
0
Answered by
OniiCh_n 410 Moderation Voter
9 years ago

Put it into a script in the workspace.

and add this one little bit:

function countDown()
local Time = script.Parent
for i = 30, 0, -1 do
Time.Text = i 
wait(1)
end
end

countDown()
Ad

Answer this question