My script :
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
game.ReplicatedStorage.ToolGive.OnServerEvent:Connect(function(player) --checks for event
local tool = game.Lighting.DarkSword:Clone() --gets tool
tool.Parent = game.Players.LocalPlayer:FindFirstChild("Backpack") --gives tool
end) --ends lol
: This is supposed to give you a weapon, the first three lines i added because the backpack wouldnt load in and apparently you need the give the character time to load in.
I keep getting either 3 of the following errors:
Attempt to index nil with character Attempt to index nil with backpack Attempt to index nil with FindFirstChild
I have no idea what to do at this point, ive been trying to fight this bug for like 2 hours. Any insight would be appreciated.

1 comment
Is it a script or localscript