|
| 02 Aug 2015 03:44 PM |
13:42:18.880 - TimerScreen is not a valid member of StarterGui 13:42:18.886 - Script 'Players.Player1.Backpack.LocalScript', Line 3 13:42:18.891 - Stack End
local Time = game.Workspace.TouchPart
local timerGui = game.StarterGui.TimerScreen
Time.Touched:connect(function() for i = 180, 0, -1 do wait(1) timerGui.Timer.Numbers.Text = i if i == 0 then break end end end)
There is a screengui i renamed "TimerScreen" inside StarterGui timerGui is the frame. Numbers is a textlabel.....
What am I doing wrong? Just trying to make a simple gui that counts down.....
|
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 02 Aug 2015 03:45 PM |
| You have to edit playergui not startergui |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 03:47 PM |
| Capitalization matters, also, you would want to get the PlayerGui, because StarterGui does not display, it's a container for GUIs that go into a player for when they spawn. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 03:52 PM |
| How would I re-write the script to get it in PlayerGui then? |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 02 Aug 2015 03:53 PM |
You're changing the text inside of a folder called StarterGui. You want it to be PlayerGui, assuming you're working in a local script (which you are).
PlayerGui presides in the Player. So, you might want to consider a variable for Player.
So, something like:
local Time = game.Workspace.TouchPart local Player = script.Parent.Parent local timerGui = Player.PlayerGui.TimerScreen
Time.Touched:connect(function() --consider putting a debounce for i = 180, 0, -1 do wait(1) timerGui.Timer.Numbers.Text = i if i == 0 then break end end end) |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 05:11 PM |
local Player = script.Parent.Parent????
where would I put this??? Where would the script be at?? |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 05:15 PM |
| The gui goes in StarterGui, the script goes....i dunno i'm confused now... |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 05:15 PM |
| player = game.Players:FindFirstChild(script.Parent.Parent.Name) |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 05:20 PM |
| Thx for rewriting it, but i still don't know where to put the actual script. I know it's in a local script, but what folder shall i put it in? Workspace? StarterGui? Players??? |
|
|
| Report Abuse |
|
|
| |
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 02 Aug 2015 05:34 PM |
StarterGui -->TheScript
I think. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 05:37 PM |
HOLY CRAP!!!
IT WORKS!!!
Thanks so much everyone for you help :) |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 02 Aug 2015 05:59 PM |
to clear up your confusion: http://wiki.roblox.com/index.php?title=User:MrNicNac/Where_are_all_the_GUIs%3F
|
|
|
| Report Abuse |
|
|