script.Parent.Humanoid.Touched:Connect(function(g) if g.Parent.Humanoid.Name == "Humanoid" then local d =game.Players:GetPlayerFromCharacter(g) d.Team = game.Teams["not game"] end end)
it gives an error that "humanoid is not a valid member of spawn location" and it will not run ever after that error. it doesn't even work when I move the spawn location up. this is the only spawn location block.
Try :FindFirstChild
!
Like this,
script.Parent.Humanoid.Touched:Connect(function(g) if g.Parent:FindFirstChild("Humanoid") then local d =game.Players:GetPlayerFromCharacter(g) d.Team = game.Teams["not game"] end end)
It would check if Humanoid
is a valid member of g.Parent
which is your character.