generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help please

Previous Thread :: Next Thread 
LV1Z is not online. 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
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
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 is not online. LV1Z
Joined: 23 Jul 2011
Total Posts: 652
07 Oct 2012 05:55 PM
Thanks little dude
Report Abuse
LV1Z is not online. LV1Z
Joined: 23 Jul 2011
Total Posts: 652
07 Oct 2012 06:00 PM
Nu work D:
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
07 Oct 2012 06:01 PM
Errr.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
07 Oct 2012 06:02 PM
We're all little dudes.

~I'm a prosperous superhero!~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image