Hi I’ve made a script to strip all players which are alive at the end of the round then gives them a weapon. This works but after about a second they get their old weapons back. Not sure why this is happening but here is my code (there is a 1 second timer because if the last kill is a scoped weapon it glitches out) :
if SERVER then local function GiveWeapon() timer.Simple( 1, function() for k, v in pairs(player.GetAll()) do if v:IsSpec() == false then v:StripWeapons() v:Give("weapon_ttt_shuriken_end") end end end) end hook.Add("TTTEndRound", "EndRoundWeapons", GiveWeapon) end
I was getting this error in console
Could not spawn all loadout weapons for Nav, will retry.
This is because I installed the TTT lightsaber, so when I stripped the lightsaber the game automatically gave me my loudout.