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

GUI Automatical Changer Problem (?)

Hi, I have made a test changer script that changes every second but it seems like it isnt work at all.. I've tried changing and changing the script but it seems to not work, please tell me what am I doing wrong..

PS : I'm new here so.. yea..

Script I V


local t = game.StarterGui.changeGUI.changeText
local p = game.StarterGui.changeGUI.changePic

while true do
      t.Text = "textExample"
      wait (0.999)
       t.Text = "imnewtoscripting"
      wait (0.999)
       t.Text = "yea im tired right now lol"
       p.Visible = true
end

Note : I use Filtering Enabled, the script is way longer tho..but I don't have my PC yet so..

2 comments

0

Is it a LocalScript?

0

Nope

2 answers

✓ Accepted answer
-- Local Script
-- Put inside a ScreenGui

local Player = game.Players.LocalPlayer

local t = Player.PlayerGui:WaitForChild("changeGUI"):WaitForChild("changeText")
local p = Player.PlayerGui:WaitForChild("changeGUI"):WaitForChild("changePic")

while true do
      t.Text = "textExample"
      wait (0.999)
       t.Text = "imnewtoscripting"
      wait (0.999)
       t.Text = "yea im tired right now lol"
       p.Visible = true
end

This changes the GUIs inside the starterGui, which means those changes can only be seen when someone respawned.

local t = game.StarterGui.changeGUI.changeText
local p = game.StarterGui.changeGUI.changePic

while true do
      t.Text = "textExample"
      wait (0.999)
       t.Text = "imnewtoscripting"
      wait (0.999)
       t.Text = "yea im tired right now lol"
       p.Visible = true
end

This would be appropriate if you'd like the changes right away in your screen, and don't forget to put this inside a 'Local Script'.

local gui = game.Players.LocalPlayer.PlayerGui
local t = gui.changeGUI.changeText
local p = gui.changeGUI.changePic

while true do
      t.Text = "textExample"
      wait (0.999)
       t.Text = "imnewtoscripting"
      wait (0.999)
       t.Text = "yea im tired right now lol"
       p.Visible = true
end

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