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

Scripts And Local Scripts Problems?

Asked by 10 years ago

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)
0
Local Scripts only work on the client side, so they cannot work in Workspace, which is considered the server side.. Tkdriverx 514 — 10y
0
:( Anthony9960 210 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

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
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? TheeDeathCaster 2368 — 10y
Ad

Answer this question