#Help identify what team a player is on

6 messages · Page 1 of 1 (latest)

sturdy burrow
#

local player = game.Players:GetPlayerFromCharacter(hit.Parent)

#

and then also check if it is a Player

tender cliff
#

Check if it's nil after the above code ^

sturdy burrow
#
lazer.Touched:Connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        print(player.Team)
    end
end)
shrewd gorge
#

hit.parent is the char

#

not player