function TouchInputController:ShowAimButton(show: boolean)
self.gui.Buttons.AimButton.Visible = show
end
function GuiController:updateHitmarkerPosition(newPosition: UDim2, isZoomed: boolean)
if isZoomed then
self.reticleGui.Hitmarker.Position = newPosition
else
self.reticleGui.Hitmarker.Position = hitmarkerPosition
end
end
its from 2 different scripts, and it says
ReplicatedStorage.Guns.Scripts.GuiController:131: attempt to index nil with ‘Hitmarker’
Your self variable isn’t being passed through correctly then. Make sure that it is what it’s supposed to be, as the error suggests that self.reticleGui is nil.
i found the error, the script where i was calling these functions was having a self too, with the touchinputcontroller and the guicontroller inside, and i forgot to put self before the GuiController:UpdateHitmarkerPosition