Hello. I am doing a commission for a 6 guns, in each gun’s client script, I wait until game:IsLoaded()
is true and then start getting the mouse, etc. But, only in the first gun it doesn’t error, but in the guns after, it errors 'attempt to index nil with :GetMouse()`. Here is the client script (important part):
repeat wait() until game:IsLoaded() == true
local tool = script.Parent;
local isShooting = false;
local userInputService = game:GetService("UserInputService");
local mouse = game.Players.LocalPlayer:GetMouse(); -- Here it errors.