Hello Developers! I get this error when I am putting a gun from server storage into a players backpack. When the gun is in starterpack its fine and it works, but when I put it into server storage and then the round starts and it puts it into the players backpack the gun stops working. Here is the gun I am using, it is part of the weapons kit, I am using the AR gun specifically:
In your script in line 181 one of your variables is defined as “nil” meaning it doesn’t exist. Double check your code and make sure everything is defined either by using print statements or breakpoints if that doesn’t help you could you please provide some more code so we can help you if the issue persists.
Ok here is the block of code that is defined as “nil”
(Line 181 is: WeaponsSystem.onCharacterAdded(Players.LocalPlayer.Character))
Players.LocalPlayer.CharacterAdded:Connect(WeaponsSystem.onCharacterAdded)
if Players.LocalPlayer.Character then
WeaponsSystem.onCharacterAdded(Players.LocalPlayer.Character)
end
Ok but that code is above 400 lines so i think its better if you get the model and open studio.
The script which starts the round and gives players their gun already clones it into the players backpack.