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

Scripts And Local Scripts Problems?

Is there such thing as a script that acts like a local script but can be placed in workspace? If there there is such thing then help me with this script there is nothing wrong but i need a way to act like a local script but can be placed in workspace.

GuiText = game.Players.LocalPlayer.PlayerGui.GameText.Frame.TextOfGame

GuiText.Text = "Intermission 16"
wait(.6)
GuiText.Text = "Intermission 15"
wait(.6)
GuiText.Text = "Intermission 14"
wait(.6)
GuiText.Text = "Intermission 13"
wait(.6)
GuiText.Text = "Intermission 12"
wait(.6)
GuiText.Text = "Intermission 11"
wait(.6)
GuiText.Text = "Intermission 10"
wait(.6)
GuiText.Text = "Intermission 9"
wait(.6)
GuiText.Text = "Intermission 8"
wait(.6)
GuiText.Text = "Intermission 7"
wait(.6)
GuiText.Text = "Intermission 6"
wait(.6)
GuiText.Text = "Intermission 5"
wait(.6)
GuiText.Text = "Intermission 4"
wait(.6)
GuiText.Text = "Intermission 3"
wait(.6)
GuiText.Text = "Intermission 2"
wait(.6)
GuiText.Text = "Intermission 1"
wait(.6)

2 comments

0

Local Scripts only work on the client side, so they cannot work in Workspace, which is considered the server side..

0

:(

1 answer

✓ Accepted answer

I personally use functions for this kind of Gui

* Example *:

function GuiText(Txt)
for _, Plr in pairs(game.Players:GetPlayers()) do
Gui=Plr:FindFirstChild("PlayerGui")
-----------------------------------------------
Gui.GameText.Frame.TextOfGame.Text=(Txt)
end
end

Second part

GuiText("Intermisson 10") 
wait(0.6)
 GuiText("Intermisson 9")
--Etc

1 comment

0

Why not use a 'for' loop [for i = 10, 0, -1 do GuiText("Intermission "..i) wait(1) end] instead of repeatedly using 'GuiText(str)' for each number?

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