|
| 25 Jun 2014 11:09 PM |
No idea what's wrong.
No output, nothin'.
The value of the parent does change, but the text of the gui doesn't...
function onChanged() wait(0.5) if script.Parent:findFirstChild("Value")==true then for _,v in pairs(game.Players:GetPlayers()) do v.PlayerGui["Sats"]["Frame"]["Sat1"].Text = "Satellite 1: Armed" end elseif script.Parent:findFirstChild("Value")==false then for _,v in pairs(game.Players:GetPlayers()) do v.PlayerGui["Sats"]["Frame"]["Sat1"].Text = "Satellite 1: Disarmed" end end end script.Parent.Changed:connect(onChanged)
Help would be appreciated! Thanks! (: |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
Thylord
|
  |
| Joined: 19 Feb 2010 |
| Total Posts: 159 |
|
|
| 25 Jun 2014 11:33 PM |
bump because my imbecile friend cant fix it /jesus4lyfe/ |
|
|
| Report Abuse |
|
|
iJava
|
  |
| Joined: 06 Mar 2011 |
| Total Posts: 29914 |
|
|
| 25 Jun 2014 11:35 PM |
Here I found the bug change to this and it should work v = True game.workspace.Satellite.Armed = v if false then game.workspace.Satellite.Aremed = false
jk Bump for a friends
~YOSkater |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2014 11:35 PM |
| what exactly is script.Parent? |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2014 11:36 PM |
changeAllText = function(texty) for _,v in pairs(game.Players:GetPlayers()) do if v.PlayerGui:FindFirstChild("Sats") then v["Sats"]["Frame"]["Sat1"].Text = texty end end end
script.Parent.Changed:connect(function(steve) if script.Parent:FindFirstChild("Value") then changeAllText("Satellite 1: Armed") elseif not script.Parent:FindFirstChild("Value") then changeAllText("Satellite 1:Disarmed") end end)
Not sure if that'll make a difference, but worth a shot. |
|
|
| Report Abuse |
|
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 26 Jun 2014 12:40 AM |
....................
function onChanged() wait(0.5) if script.Parent.Value==true then for _,v in pairs(game.Players:GetPlayers()) do pcall(function() v.PlayerGui["Sats"]["Frame"]["Sat1"].Text = "Satellite 1: Armed" end) end else for _,v in pairs(game.Players:GetPlayers()) do pcall(function() v.PlayerGui["Sats"]["Frame"]["Sat1"].Text = "Satellite 1: Disarmed" end) end end end script.Parent.Changed:connect(onChanged)
|
|
|
| Report Abuse |
|
|
zub74
|
  |
| Joined: 13 Sep 2008 |
| Total Posts: 489 |
|
|
| 26 Jun 2014 12:41 AM |
| You need to define what's being changed at the beginning of the function. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 09:07 AM |
I don't have to... I define it at the end with my connect line...
And also, the parent is a BoolValue. And for those, I just check if it's true or false, yeah? |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 09:55 AM |
findFirstChild returns an OBJECT not the value of the object you want(in this case bool value)
so just do
if obj.Value then --it's true end |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
| |
|
|
| 26 Jun 2014 07:18 PM |
| I'm trying it now. I had baseball games in the morning so I could only check the forum, not enough time to test it. |
|
|
| Report Abuse |
|
|