#give tool on respawn

16 messages · Page 1 of 1 (latest)

hybrid mica
#
local Players = game:GetService("Players")
local ss = game:GetService("ServerStorage")

Players.PlayerAdded:Connect(function(Player)

    Player.CharacterAdded:Connect(function(Character)
        print("Respawned")
        if Player.Team == "Terrorists" then
            local weapon = ss:FindFirstChild("Glock 19"):Clone()
            weapon.Parent = Player.Backpack
        elseif Player.Team == "Counter-Terrorists" then
            local weapon = ss:FindFirstChild("MP-443 GRACH"):Clone()
            weapon.Parent = Player.Backpack
        end
    end)

end)```
Apparently it doesnt give the weapon
#

but when a player dies, the tool has to be added

#

since in the main menu the player's team is "choosing" not terrorists or counter terrorists

#

so on respawn i wanted to check if player is on which team and give the a weapon

#

oh

#

no error on output tho

#

it should have says Instance is not part of whatever

#

ok it works

#

thanks

chilly estuaryBOT
#

studio** You are now Level 8! **studio

raven shell
#

@hybrid mica pretty sure you can put the tool under the team in Teams

#

and it will autogive on respawn

#

maybe

#

idk

#

maybe im stupid

hybrid mica
#

i dont think thats how it works 💀