youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:09 PM |
points = game:GetService("PointService") -- or PointsService abc = points:GetAwardablePoints() script.Parent.Text = "Awardable Points:" ..abc.. "!"" |
|
|
| Report Abuse |
|
|
| |
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:10 PM |
| Oops, sorry forgot to say, it doesn't work. |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:10 PM |
| I see an extra " when you are setting text. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:12 PM |
| I think that's supposed to be there. |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 May 2014 03:13 PM |
No it isn't and you could use string.format instead of concatenation.
points = game:GetService("PointService") -- or PointsService abc = points:GetAwardablePoints() script.Parent.Text = string.format("Awardable Points: %s!", abc) |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:15 PM |
Still doesn't work. It doesn't change anything. It used to work, then suddenly, it stopped. |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:18 PM |
| It should be "PointsService" not "PointService" |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:21 PM |
Still doesn't change it. Should I put the script in Workspace, and do this: game.Players.LocalPlayer.PlayerGui.Points.Text = "blah blah?" |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:25 PM |
"script in Workspace" "LocalPlayer" |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
| |
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:31 PM |
Tried that, doesn't work. Can anyone link me to a GUI for this that works? |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:34 PM |
I'm not going to make you a script but I will tell you how you would do it.
Create a loop in a Script that checks the amount of AwardablePoints If it is a different value than it was before loop through all the players and change their gui Text to the current value. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:37 PM |
p = game:GetService("PointsService") ap = p:GetAwardablePoints() while wait(1) do function change() script.Parent.Text = "Awardable Points" ..ap.. "!" end ap.Changed:connect(change) |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:39 PM |
p = game:GetService("PointsService") ap = p:GetAwardablePoints() while wait(1) do function change() script.Parent.Text = "Awardable Points" ..ap.. "!" end ap.Changed:connect(change)
I would recommend you change the wait time to about 5. You shouldn't declare a function in a while loop You forgot an end. You use the Changed event for no reason. You can't set the Text for all the Players just by using script.Parent.Text. |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:40 PM |
"I'm not going to make you a script" -FreeScriptMaker
I feel this is a paradox... |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:42 PM |
| Maybe a should change my username to ExpensiveScriptMaker? |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:43 PM |
| Yea, then charge ten-thousand per line for scripts. |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 22 May 2014 03:44 PM |
| Just remove all enters then. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:45 PM |
p = game:GetService("PointsService") ap = p:GetAwardablePoints() while wait(5) do game.Players.LocalPlayer.PlayerGui.Points.Text = "Awardable Points" ..ap.. "!" end |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:46 PM |
It shouldn't be in a LocalScript. You should loop through all the players so it would be like
for i,Player in pairs(game.Players:GetPlayers()) do
end |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:47 PM |
p = game:GetService("PointsService") ap = p:GetAwardablePoints() while wait(5) do for i, v in pairs (game.Players:GetPlayers()) do v.PlayerGui.Points.Text = "Awardable Points" ..ap.. "!" end end |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 03:49 PM |
| Yes that is about right but I would recommend you make sure that the Player actually has a PlayerGui and there is a Points TextGui in the PlayerGui. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 22 May 2014 03:52 PM |
p = game:GetService("PointsService") ap = p:GetAwardablePoints() while wait(5) do for i, v in pairs (game.Players:GetPlayers()) repeat wait() until v.PlayerGui repeat wait() until v.PlayerGui.Points v.PlayerGui.Points.Text = "Awardable Points" ..ap.. "!" end |
|
|
| Report Abuse |
|
|