Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Team Color Script help?

script.Parent.Touched:connect(function(hit)
	
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	
	if player.TeamColor == "Bright blue" then
		print("blue")
	end
	
end)

Why doesn't this script work?

1 answer

script.Parent.Touched:connect(function(hit)

    local player = game.Players:FindFirstChild(hit.Parent.Name) -- I just use this.. I find it to be easier :D

    if player.TeamColor == "Bright blue" then
        print("blue")
    end

end)

This discussion is preserved as it was. New answers, comments, and votes are closed.