So I am basically trying to access a local player character but it gives me this weird error when I am waiting for it to load.
Inside a tool, localscript
local player = game:GetService("Players").LocalPlayer
repeat wait() until player.Character
local chr = player.Character
local tool = script.Parent
local handle = tool:FindFirstChild("handle") --Variables
local mouse = player:GetMouse()
Fixed
local player = game:GetService("Players").LocalPlayer
local chr = player.Character or player.CharacterAdded:wait()
local tool = script.Parent
local handle = tool:FindFirstChild("handle") --Variables
local mouse = player:GetMouse()
Output
22:01:21.180 - Wait is not a valid member 22:01:21.181 - Script 'Players.Player1.Backpack.Tool.LocalScript', Line 2 22:01:21.181 - Stack End
Error appears before I equip the tool!

6 comments
This is rather odd.
This doesn't seem right... is there anything else wrong?
Nope just that because of this error I can't test anything I do with the tool, it errors directly and the tool is out of function, kinda
Doesn't "wait()" need to be uppercase? ("Wait()")
Nope, when it's uppercase then it gives this error but my wait is literally lowecasse: https://gyazo.com/9c0b1cbd6388d6b82341ae72f5e4f0b4
Maybe you should try wait(1)? This has happened to me before, and it seemed to help.