Local Script Lines 75 - 79:
workspace.PickupPistol_1.Touched:Connect(function(hit)
if hit then
game.ReplicatedStorage.PistolPickupEvent:FireServer(hit)
end
end)
Local Script Lines 81 - 87:
workspace.PickupRifle_1.Touched:Connect(function(hit)
if hit then
game.ReplicatedStorage.RiflePickupEvent:FireServer(hit)
end
end)
Server Script Lines 45 - 52:
pistolpickup.OnServerEvent:Connect(function(plr, hit)
if hit.Parent.Humanoid then
game.ReplicatedStorage.GunSwapBool.Value = true
game.ReplicatedStorage.PistolEquipped.Value = true
game.ReplicatedStorage.RifleEquipped.Value = false
game.ReplicatedStorage.GunSwapRifleBool.Value = false
end
end)
Server Script lines 54 - 61:
riflepickup.OnServerEvent:Connect(function(plr, hit)
if hit.Parent.Humanoid then
game.ReplicatedStorage.GunSwapRifleBool.Value = true
game.ReplicatedStorage.PistolEquipped.Value = false
game.ReplicatedStorage.RifleEquipped.Value = true
game.ReplicatedStorage.GunSwapBool.Value = false
end
end)

5 comments
error: ServerScriptService.BackendTest:55: attempt to index nil with 'Parent'
So the error is on the 55th line?
are these the full scripts?
Show us the script "BackendTest" at lines 40-60
lines 50 - 57:riflepickup.OnServerEvent:Connect(function(plr) game.ReplicatedStorage.GunSwapRifleBool.Value = true game.ReplicatedStorage.PistolEquipped.Value = false game.ReplicatedStorage.RifleEquipped.Value = true game.ReplicatedStorage.GunSwapBool.Value = false end)