#help

2 messages · Page 1 of 1 (latest)

solemn eagle
#

i suck at scripting what is wrong local SpareAmmo = 10 other script is if ammBOX clicked
local SpareAmmo = 20 how do i get this to work

lone flax
#

For the click detection, youll first need the path to the ClickDetector (ie, script.Parent.ClickDetector), then connect that up onto a MouseClick event. As for the SpareAmmo, the simplest things to do is to

  1. Make an intvalue object to allow easy changes of a value cross-script
  2. Module scripts to share
  3. Bindable Events (Not as suggested though)
    Then if you did the 1st option, youd need the path to the new IntValue, then make the SpareAmmo = path.to.intValue, and whenever you need to access the number inside it just do SpareAmmo.Value