-
What do you want to achieve? Keep it simple and clear!
Make the Reload button work normally like the others. -
What is the issue? Include screenshots / videos if possible!
For some obscure reason, the Reload button is simply ignored by ALL CAS functions, ignoring SetPosition, SetImage and even :UnbindAction, causing it to duplicate itself every time it is activated again.
Button without Image and without Text in the default position would be the Reload button:
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried searching but either in different situations, or they were completely ignored
CAS:BindAction("Fire", handleAction, true, Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonR2)
CAS:BindAction("ADS", handleAction, true, Enum.UserInputType.MouseButton2, Enum.KeyCode.ButtonL2)
CAS:BindAction("Reload", handleAction, true, gameRules.Reload, Enum.KeyCode.ButtonB)
CAS:BindAction("CycleAimpart", handleAction, false, gameRules.SwitchSights)
CAS:BindAction("CycleLaser", handleAction, false, gameRules.ToggleLaser)
CAS:BindAction("CycleLight", handleAction, false, gameRules.ToggleLight)
CAS:BindAction("CycleFiremode", handleAction, false, gameRules.FireMode)
CAS:BindAction("CheckMag", handleAction, false, gameRules.CheckMag)
CAS:BindAction("ZeroDown", handleAction, false, gameRules.ZeroDown)
CAS:BindAction("ZeroUp", handleAction, false, gameRules.ZeroUp)
CAS:BindAction("DropWeapon", handleAction, false, gameRules.DropGun)
--Kairupu CAS Setup
--Images
CAS:SetImage("Fire","http://www.roblox.com/asset/?id=11702759774")
CAS:SetImage("ADS","http://www.roblox.com/asset/?id=1494799070")
CAS:SetImage("Reload","http://www.roblox.com/asset/?id=5652079969")
--Pos
CAS:SetPosition("Fire",UDim2.new(-2.305, 0,-0.125, 0))
CAS:SetPosition("ADS",UDim2.new(0.737, 0,-0.125, 0))
CAS:SetPosition("Reload",UDim2.new(0.737, 0,-0.483, 0))
CAS:UnbindAction("Reload")
Everything besides the Reload button works normally, and the Script completely ignores the existence of any bug and continues as if nothing had happened.
Things I noticed:
- GetButton is returning Nil
- The Button still works normally, you can still click and the function runs normally.
EDIT ! IMPORTANT !
After some testing, I realized that it is not something specific to the RELOAD button, but rather the 8th or + button to be activated in the CAS
This was my first topic, please let me know if I did something wrong.