So, I have a problem where, when a player joins, it checks if they have a certain thing, and if they do, gives it to them, but, if they don't, checks if they have another thing. If they don't have anything, then ends the script. The middle is cut out because it's so big and I know works. Anyway, the script stops working on line 4. WaitForChild(). It might be because I have a StarterCharacter.
game.Players.PlayerAdded:Connect(function(plr) print("PlayerAdded") local Char = plr.Character Char:WaitForChild("Humanoid") --This is where the script stops working, even tho my character does load humanoid. Maybe because I have a StarterCharacter? print("CharAdded") --A big block of code that I know works is here --The functions for the armor are here wait(0.1) if plr.Armor["Oblivo Armor"].Value == true then print("ObTrue") ObArmor() elseif plr.Armor.Titanium.Value == true then print("KnTrue") KnArmor() elseif plr.Armor.Steel.Value == true then print("StTrue") StArmor() elseif plr.Armor.Iron.Value == true then print("IrTrue") IrArmor() else print("NoneTrue") end end)
Add a CharacterAdded event. You can't do the player.Character variable because it will be nil. The player is added first before the character. Sure the time difference might be slim, but it's a big difference.
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) end) end)
Also have you checked if the player has those values to begin with? It seems you just put the values inside the player.