kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 31 Mar 2012 07:37 AM |
So this script basicly takes a value that is supposed to be in the player but for some reason when I test on 'Play' (Becuase the IntValues aren't inserted when I test 'Play Solo') it doesn't work. Here's the script:
--[[And yeah the way the gui is set up goes like this. Player>PlayerGui>ScreenGui>TextLabel>Script ]]
while true do local Player = script.Parent.Parent.Parent.Parent local PlayerStat = Player["$s"] script.Parent.Text = " x"..PlayerStat.Value.."." end
--Yep. |
|
|
| Report Abuse |
|
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 31 Mar 2012 07:53 AM |
| I think if I made my title have more " ! " 's I would have a reply right about now. :( Please answer, Oh and Bump! |
|
|
| Report Abuse |
|
|
| |
|
DangCool
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 5568 |
|
| |
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 31 Mar 2012 07:59 AM |
| Oh. Yeh. Should have saw that. *FacePalm* Thank you. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 08:04 AM |
I remember from past experiences that 'while true do' usually needs a 'wait()' function somewhere inside of it, or it instead needs to be 'while wait(time) do'.
I also know that your script will not work if it cannot find the value inside of the player. Usually you have to wait some time before you can access values inside of a player, especially if they have been inserted by a script. My suggestion would to insert a loop to wait until the value inside the player is found.
If I do not misunderstand your purpose, the final script would be:
Player = script.Parent.Parent.Parent.Parent
repeat wait() until Player:findFirstChild("$s")
while wait() do local Player = script.Parent.Parent.Parent.Parent local PlayerStat = Player["$s"] script.Parent.Text = " x"..PlayerStat.Value.."." end
Correct me if I am wrong.
|
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 08:43 AM |
| @ fireblade, not usually, always. |
|
|
| Report Abuse |
|
|