LV1Z
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 652 |
|
|
| 07 Oct 2012 05:48 PM |
local tool = script.Parent local player = tool.Parent.Parent local ammunition = tool.ammo.Value local maxammo = tool.maxammo.Value
function gui(mouse) gui = Instance.new("ScreenGui") gui.Parent = player.PlayerGui ammo = Instance.new("TextLabel") ammo.Parent = gui ammo.Size = UDim2.new(0.2,0,0,50) ammo.Text = ammunition.."/"..maxammo ammo.Font = "ArialBold" ammo.FontSize = "Size18" ammo.BackgroundTransparency = 1 ammo.Name = "Ammo" ammo.TextTransparency = 0.5 ammo.Visible = true ammo.Position = UDim2.new(0.6,0,0.75,0) ammo.TextColor3 = Color3.new(0,0,0) mouse.Button1Down:connect(function() ammunition = ammunition - 1 end) end
I want the gui to refresh every time the player clicks, how do i do that? |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 05:54 PM |
Do it so that if the value changes. The text changes. Like so:
value.Changed:connect(function() ammo.Text = "blahblah" end) |
|
|
| Report Abuse |
|
|
LV1Z
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 652 |
|
| |
|
LV1Z
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 652 |
|
| |
|
| |
|
|
| 07 Oct 2012 06:02 PM |
We're all little dudes.
~I'm a prosperous superhero!~ |
|
|
| Report Abuse |
|
|