Is there a limit to how many buttons :GetButton() can be used on? On my eighth button, the function always returns nil no matter how which order I place the buttons in.
ContextActionService:BindAction("Switch", HandleAction , true, "t")
ContextActionService:SetPosition("Switch",UDim2.new(0.8,10,0.72,10-2))
ContextActionService:SetImage("Switch","rbxassetid://3645791381")
local button = ContextActionService:GetButton("Switch")
button.Size = UDim2.new(0,BUTTONSIZE-20,0,BUTTONSIZE-20)
ContextActionService:BindAction("Edit", HandleAction , true, "t")
ContextActionService:SetPosition("Edit",UDim2.new(0.8,0,0.45,-BUTTONSIZE-5))
ContextActionService:SetImage("Edit","rbxassetid://3645139947")
button = ContextActionService:GetButton("Edit")
button.Size = UDim2.new(0,BUTTONSIZE,0,BUTTONSIZE)
ContextActionService:BindAction("Build", HandleAction , true, "t")
ContextActionService:SetPosition("Build",UDim2.new(0.8,0,0.45,-5+BUTTONSIZE))
button = ContextActionService:GetButton("Build")
button.Size = UDim2.new(0,BUTTONSIZE,0,BUTTONSIZE)
ContextActionService:BindAction("Shoot", HandleAction , true, "t")
ContextActionService:SetImage("Shoot","rbxassetid://3645791517")
button = ContextActionService:GetButton("Shoot")
button.Size = UDim2.new(0,BUTTONSIZE,0,BUTTONSIZE)
ContextActionService:SetPosition("Shoot",UDim2.new(0.8,-BUTTONSIZE,0.45,-5))
ContextActionService:BindAction("Scope", HandleAction , true, "t")
ContextActionService:SetPosition("Scope",UDim2.new(0.8,0,0.45,-5))
ContextActionService:SetImage("Scope","rbxassetid://3645791623")
button = ContextActionService:GetButton("Scope")
button.Size = UDim2.new(0,BUTTONSIZE,0,BUTTONSIZE)
ContextActionService:BindAction("Reload", HandleAction , true, "t")
ContextActionService:SetPosition("Reload",UDim2.new(0.4,0,1,-BUTTONSIZE-5))
ContextActionService:SetImage("Reload","rbxassetid://3646724203")
button = ContextActionService:GetButton("Reload")
button.Size = UDim2.new(0,BUTTONSIZE * 3/4,0,BUTTONSIZE * 3/4)
ContextActionService:BindAction("ResetEdit", HandleAction , true, "t")
ContextActionService:SetPosition("ResetEdit",UDim2.new(0.8,-BUTTONSIZE,0.45,-BUTTONSIZE-5))
ContextActionService:SetImage("ResetEdit","rbxassetid://3645169990")
button = ContextActionService:GetButton("ResetEdit")
button.Size = UDim2.new(0,BUTTONSIZE,0,BUTTONSIZE)
ContextActionService:BindAction("Move", HandleAction , true, "t")
ContextActionService:SetPosition("Move",UDim2.new(0.8,-BUTTONSIZE,0.45,-BUTTONSIZE-5))
ContextActionService:SetImage("Move","rbxassetid://3672810912")
button = ContextActionService:GetButton("Move")
print(button)
button.Size = UDim2.new(0,BUTTONSIZE,0,BUTTONSIZE)